data communication essentials

146
Data Communication Essentials Excerpted from Joe Conron’s data communications course

Upload: allayna

Post on 25-Feb-2016

77 views

Category:

Documents


0 download

DESCRIPTION

Data Communication Essentials. Excerpted from Joe Conron’s data communications course. A Communications Model. Source generates data to be transmitted Transmitter Converts data into transmittable signals Transmission System Carries data Receiver Converts received signal into data - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Data Communication Essentials

Data Communication Essentials

Excerpted from Joe Conronrsquos data communications course

A Communications Modelbull Source

ndash generates data to be transmittedbull Transmitter

ndash Converts data into transmittable signalsbull Transmission System

ndash Carries databull Receiver

ndash Converts received signal into databull Destination

ndash Takes incoming data

Simplified Communications Model - Diagram

Key Communications Tasksbull Transmission System Utilizationbull Interfacingbull Signal Generationbull Synchronizationbull Error detection and correctionbull Addressing and routingbull Recoverybull Message formattingbull Securitybull Network Management

Networking

bull Point to point communication not usually practicalndash Devices are too far apartndash Large set of devices would need impractical

number of connectionsbull Solution is a communications network

Simplified Network Model

The Network Core

bull mesh of interconnected routers

bull the fundamental question how is data transferred through netndash circuit switching dedicated

circuit per call telephone net

ndash packet-switching data sent thru net in discrete ldquochunksrdquo

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 2: Data Communication Essentials

A Communications Modelbull Source

ndash generates data to be transmittedbull Transmitter

ndash Converts data into transmittable signalsbull Transmission System

ndash Carries databull Receiver

ndash Converts received signal into databull Destination

ndash Takes incoming data

Simplified Communications Model - Diagram

Key Communications Tasksbull Transmission System Utilizationbull Interfacingbull Signal Generationbull Synchronizationbull Error detection and correctionbull Addressing and routingbull Recoverybull Message formattingbull Securitybull Network Management

Networking

bull Point to point communication not usually practicalndash Devices are too far apartndash Large set of devices would need impractical

number of connectionsbull Solution is a communications network

Simplified Network Model

The Network Core

bull mesh of interconnected routers

bull the fundamental question how is data transferred through netndash circuit switching dedicated

circuit per call telephone net

ndash packet-switching data sent thru net in discrete ldquochunksrdquo

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 3: Data Communication Essentials

Simplified Communications Model - Diagram

Key Communications Tasksbull Transmission System Utilizationbull Interfacingbull Signal Generationbull Synchronizationbull Error detection and correctionbull Addressing and routingbull Recoverybull Message formattingbull Securitybull Network Management

Networking

bull Point to point communication not usually practicalndash Devices are too far apartndash Large set of devices would need impractical

number of connectionsbull Solution is a communications network

Simplified Network Model

The Network Core

bull mesh of interconnected routers

bull the fundamental question how is data transferred through netndash circuit switching dedicated

circuit per call telephone net

ndash packet-switching data sent thru net in discrete ldquochunksrdquo

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 4: Data Communication Essentials

Key Communications Tasksbull Transmission System Utilizationbull Interfacingbull Signal Generationbull Synchronizationbull Error detection and correctionbull Addressing and routingbull Recoverybull Message formattingbull Securitybull Network Management

Networking

bull Point to point communication not usually practicalndash Devices are too far apartndash Large set of devices would need impractical

number of connectionsbull Solution is a communications network

Simplified Network Model

The Network Core

bull mesh of interconnected routers

bull the fundamental question how is data transferred through netndash circuit switching dedicated

circuit per call telephone net

ndash packet-switching data sent thru net in discrete ldquochunksrdquo

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 5: Data Communication Essentials

Networking

bull Point to point communication not usually practicalndash Devices are too far apartndash Large set of devices would need impractical

number of connectionsbull Solution is a communications network

Simplified Network Model

The Network Core

bull mesh of interconnected routers

bull the fundamental question how is data transferred through netndash circuit switching dedicated

circuit per call telephone net

ndash packet-switching data sent thru net in discrete ldquochunksrdquo

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 6: Data Communication Essentials

Simplified Network Model

The Network Core

bull mesh of interconnected routers

bull the fundamental question how is data transferred through netndash circuit switching dedicated

circuit per call telephone net

ndash packet-switching data sent thru net in discrete ldquochunksrdquo

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 7: Data Communication Essentials

The Network Core

bull mesh of interconnected routers

bull the fundamental question how is data transferred through netndash circuit switching dedicated

circuit per call telephone net

ndash packet-switching data sent thru net in discrete ldquochunksrdquo

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 8: Data Communication Essentials

Network Core Circuit Switching

End-end resources reserved for ldquocallrdquo

bull link bandwidth switch capacity

bull dedicated resources no sharing

bull circuit-like (guaranteed) performance

bull call setup required

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 9: Data Communication Essentials

Circuit Switching FDM and TDM

FDM

frequency

timeTDM

frequency

time

4 users

Example

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 10: Data Communication Essentials

Network Core Packet Switching

each end-end data stream divided into packets

bull user A B packets share network resources

bull each packet uses full link bandwidth

bull resources used as needed

resource contention bull aggregate resource

demand can exceed amount available

bull congestion packets queue wait for link use

bull store and forward packets move one hop at a timendash Node receives complete

packet before forwarding

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 11: Data Communication Essentials

Packet Switching Statistical Multiplexing

Sequence of A amp B packets does not have fixed pattern statistical multiplexing

In TDM each host gets same slot in revolving TDM frame

A

B

C10 MbsEthernet

15 Mbs

D E

statistical multiplexing

queue of packetswaiting for output

link

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 12: Data Communication Essentials

Packet switching versus circuit switching

bull Great for bursty datandash resource sharingndash simpler no call setup

bull Excessive congestion packet delay and lossndash protocols needed for reliable data transfer

congestion controlbull Q How to provide circuit-like behavior

ndash bandwidth guarantees needed for audiovideo appsndash still an unsolved problem (chapter 6)

Is packet switching a ldquoslam dunk winnerrdquo

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 13: Data Communication Essentials

Local Area Networks

bull Smaller scopendash Building or small campus

bull Usually owned by same organization as attached devices

bull Data rates much higherbull Usually broadcast systems

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 14: Data Communication Essentials

Protocolsbull Used for communications between entities in a systembull Must speak the same languagebull Entities

ndash User applicationsndash e-mail facilitiesndash terminals

bull Systemsndash Computerndash Terminalndash Remote sensor

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 15: Data Communication Essentials

Key Elements of a Protocol

bull Syntaxndash Data formatsndash Signal levels

bull Semanticsndash Control informationndash Error handling

bull Timingndash Speed matchingndash Sequencing

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 16: Data Communication Essentials

Whatrsquos a protocol

human protocolsbull ldquowhatrsquos the timerdquobull ldquoI have a questionrdquobull introductions

hellip specific msgs senthellip specific actions taken

when msgs received or other events

network protocolsbull machines rather than

humansbull all communication activity in

Internet governed by protocols

protocols define format order of msgs sent and received among network entities and actions taken on msg transmission receipt

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 17: Data Communication Essentials

Whatrsquos a protocola human protocol and a computer network protocol

Hi

HiGot thetime200

TCP connection reqTCP connectionreply

Get httpgaiacsumasseduindexhtm

ltfilegttime

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 18: Data Communication Essentials

In Summary a protocol is

bull An agreement about communication between two or more entities

bull It specifiesndash Format of messagesndash Meaning of messagesndash Rules for exchangendash Procedures for handling problems

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 19: Data Communication Essentials

Protocol Specification

bull As designers we can specify a protocol usingndash Event-Time Diagramsndash Transition Diagrams

bull We can implement a protocol with a Finite State Machine (FSM)

bull Internet Protocols are formalized by RFCs which are administered by IETF

bull You can find any RFC here

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 20: Data Communication Essentials

042223 20

Event -Time Diagrams

bull Define causal ordering

bull Define indicationrequestresponse actions

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 21: Data Communication Essentials

Transition Diagram

bull Illustratesndash Statesndash Input (the Event that causes transition)ndash Transitions (to new states)

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 22: Data Communication Essentials

Protocol ldquoLayersrdquo

Networks are complex

bull many ldquopiecesrdquondash hostsndash routersndash links of various

mediandash applicationsndash protocolsndash hardware software

Question Is there any hope of organizing

structure of network

Or at least our discussion of networks

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 23: Data Communication Essentials

Why layeringDealing with complex systemsbull explicit structure allows identification relationship of

complex systemrsquos piecesndash layered reference model for discussion

bull modularization eases maintenance updating of systemndash change of implementation of layerrsquos service transparent to

rest of systemndash eg change in gate procedure doesnrsquot affect rest of

systembull Can layering sometimes be undesirable

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 24: Data Communication Essentials

Internet protocol stackbull application supporting network

applicationsndash FTP SMTP HTTP

bull transport process-process data transferndash TCP UDP

bull network routing of datagrams from source to destinationndash IP routing protocols

bull link data transfer between neighboring network elementsndash PPP Ethernet

bull physical bits ldquoon the wirerdquo

application

transport

network

link

physical

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 25: Data Communication Essentials

sourceapplicatio

ntransportnetwork

linkphysical

HtHn Msegment Ht

datagram

destinationapplicatio

ntransportnetwork

linkphysical

HtHnHl MHtHn MHt M

Mnetwork

linkphysical

linkphysical

HtHnHl MHtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage MHt M

Hnframe

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 26: Data Communication Essentials

OSI

bull Open Systems Interconnectionbull Developed by the International

Organization for Standardization (ISO)bull Seven layersbull A theoretical system delivered too latebull TCPIP is the de facto standard

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 27: Data Communication Essentials

How do loss and delay occurpackets queue in router buffers bull packet arrival rate to link exceeds output link capacitybull packets queue wait for turn

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers arriving packets dropped (loss) if no free buffers

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 28: Data Communication Essentials

Four sources of packet delay

bull 1 nodal processing ndash check bit errorsndash determine output link

A

B

propagationtransmission

nodalprocessing queueing

bull 2 queueingndash time waiting at output link

for transmission ndash depends on congestion

level of router

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 29: Data Communication Essentials

Delay in packet-switched networks

3 Transmission delaybull R=link bandwidth (bps)bull L=packet length (bits)bull time to send bits into

link = LR

4 Propagation delaybull d = length of physical linkbull s = propagation speed in

medium (~2x108 msec)bull propagation delay = ds

A

B

propagationtransmission

nodalprocessing queueing

Note s and R are very different quantities

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 30: Data Communication Essentials

Data Communication and Networks

Lecture 2

Data Transmission and Encoding Concepts

September 14 2006

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 31: Data Communication Essentials

Simplified Data Communications Model

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 32: Data Communication Essentials

S(t) = A sin(2ft + Φ)

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 33: Data Communication Essentials

Terminology (1)

bull Transmitterbull Receiverbull Medium

ndash Guided mediumbull eg twisted pair optical fiber

ndash Unguided mediumbull eg air water vacuum

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 34: Data Communication Essentials

Terminology (2)

bull Direct linkndash No intermediate devices

bull Point-to-pointndash Direct link ndash Only 2 devices share link

bull Multi-pointndash More than two devices share the link

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 35: Data Communication Essentials

Terminology (3)

bull Simplexndash One direction

bull eg Television

bull Half duplexndash Either direction but only one way at a time

bull eg police radio

bull Full duplexndash Both directions at the same time

bull eg telephone

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 36: Data Communication Essentials

Analog and Digital Data Transmission

bull Data ndash Entities that convey meaning

bull Signalsndash Electric or electromagnetic representations of

databull Transmission

ndash Communication of data by propagation and processing of signals

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 37: Data Communication Essentials

Data

bull Analogndash Continuous values within some intervalndash eg sound video

bull Digitalndash Discrete valuesndash eg text integers

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 38: Data Communication Essentials

Signals

bull Means by which data are propagatedbull Analog

ndash Continuously variablendash Various media

bull wire fiber optic spacendash Speech bandwidth 100Hz to 7kHzndash Telephone bandwidth 300Hz to 3400Hzndash Video bandwidth 4MHz

bull Digitalndash Use two DC components

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 39: Data Communication Essentials

Data and Signals

bull Usually use digital signals for digital data and analog signals for analog data

bull Can use analog signal to carry digital datandash Modem

bull Can use digital signal to carry analog data ndash Compact Disc audio

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 40: Data Communication Essentials

Analog Transmission

bull Analog signal transmitted without regard to content

bull May be analog or digital databull Attenuated over distance bull Use amplifiers to boost signalbull Also amplifies noise

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 41: Data Communication Essentials

Digital Transmission

bull Concerned with contentbull Integrity endangered by noise attenuation etcbull Repeaters usedbull Repeater receives signalbull Extracts bit patternbull Retransmitsbull Attenuation is overcomebull Noise is not amplified

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 42: Data Communication Essentials

Advantages amp Disadvantages of Digital

bull Cheaperbull Less susceptible to noisebull Greater attenuation

ndash Pulses become rounded and smallerndash Leads to loss of information

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 43: Data Communication Essentials

Attenuation of Digital Signals

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 44: Data Communication Essentials

Interpreting Signals

bull Need to knowndash Timing of bits - when they start and endndash Signal levels

bull Factors affecting successful interpreting of signalsndash Signal to noise rationdash Data ratendash Bandwidth

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 45: Data Communication Essentials

Encoding Schemes

bull Nonreturn to Zero-Level (NRZ-L)bull Nonreturn to Zero Inverted (NRZI)bull Bipolar -AMIbull Pseudoternarybull Manchesterbull Differential Manchesterbull B8ZSbull HDB3

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 46: Data Communication Essentials

Nonreturn to Zero-Level (NRZ-L)

bull Two different voltages for 0 and 1 bitsbull Voltage constant during bit interval

ndash no transition Ie no return to zero voltagebull eg Absence of voltage for zero constant

positive voltage for onebull More often negative voltage for one value

and positive for the otherbull This is NRZ-L

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 47: Data Communication Essentials

Nonreturn to Zero Inverted

bull Nonreturn to zero inverted on onesbull Constant voltage pulse for duration of bitbull Data encoded as presence or absence of

signal transition at beginning of bit timebull Transition (low to high or high to low)

denotes a binary 1bull No transition denotes binary 0bull An example of differential encoding

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 48: Data Communication Essentials

NRZ

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 49: Data Communication Essentials

Differential Encoding

bull Data represented by changes rather than levels

bull More reliable detection of transition rather than level

bull However in complex transmission layouts it is easy to lose sense of polarity

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 50: Data Communication Essentials

Biphasebull Manchester

ndash Transition in middle of each bit periodndash Transition serves as clock and datandash Low to high represents onendash High to low represents zerondash Used by IEEE 8023

bull Differential Manchesterndash Midbit transition is clocking onlyndash Transition at start of a bit period represents zerondash No transition at start of a bit period represents onendash Note this is a differential encoding schemendash Used by IEEE 8025

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 51: Data Communication Essentials

Biphase Pros and Cons

bull Conndash At least one transition per bit time and

possibly twondash Maximum modulation rate is twice NRZndash Requires more bandwidth

bull Prosndash Synchronization on mid bit transition (self

clocking)

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 52: Data Communication Essentials

Asynchronous

bull Data transmitted one character at a timendash 5 to 8 bits

bull Timing only needs maintaining within each character

bull Resync with each character

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 53: Data Communication Essentials

Asynchronous (diagram)

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 54: Data Communication Essentials

Asynchronous - Behaviorbull In a steady stream interval between

characters is uniform (length of stop element)bull In idle state receiver looks for transition 1 to 0bull Then samples next seven intervals (char

length)bull Then looks for next 1 to 0 for next charbull Overhead of 2 or 3 bits per char (~20)bull Good for data with large gaps (keyboard)

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 55: Data Communication Essentials

Synchronous - Bit Level

bull Block of data transmitted without start or stop bits

bull Clocks must be synchronizedbull Can use separate clock line

ndash Good over short distancesndash Subject to impairments

bull Embed clock signal in datandash Manchester encodingndash Carrier frequency (analog)

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 56: Data Communication Essentials

Synchronous - Block Level

bull Need to indicate start and end of blockbull Use preamble and postamble

ndash eg series of SYN (hex 16) charactersndash eg block of 11111111 patterns ending in

11111110

bull More efficient (lower overhead) than async

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 57: Data Communication Essentials

Synchronous (diagram)

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 58: Data Communication Essentials

Synchronous Bit Error Detection

bull Which kinds of errors can we handle if we have synchronous bit transfer

bull Reference to bit transmission protocol in distcompppt

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 59: Data Communication Essentials

Data Link Layer

Excerpted from Joe Conronrsquos notes

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 60: Data Communication Essentials

Link Layer Servicesbull Framing link access

ndash encapsulate datagram into frame adding header trailer

ndash channel access if shared mediumndash ldquoMACrdquo addresses used in frame headers to

identify source dest bull different from IP address

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 61: Data Communication Essentials

Encoding Information FramesTypical Fields in a Frame

StartFrame

Delimiter

SourceAddress

DestinationAddress

FrameControl Data Check

sum

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 62: Data Communication Essentials

Error Detectionbull Additional bits added by transmitter for

error detection codebull Parity

ndash Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones

ndash Even number of bit errors goes undetectedndash Checksum can be a simple XOR operation

of bits to be checked

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 63: Data Communication Essentials

Parity CheckingSingle Bit ParityDetect single bit errors

Two Dimensional Bit ParityDetect and correct single bit errors

0 0

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 64: Data Communication Essentials

Internet checksum

Senderbull treat segment contents as

sequence of 16-bit integersbull checksum addition (1rsquos

complement sum) of segment contents

bull sender puts checksum value into UDP checksum field

Receiverbull compute checksum of received

segmentbull check if computed checksum

equals checksum field valuendash NO - error detectedndash YES - no error detected

But maybe errors nonetheless More later hellip

Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer only)

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 65: Data Communication Essentials

Multiple Access protocolsbull single shared broadcast channel bull two or more simultaneous transmissions by

nodes interference ndash collision if node receives two or more signals at the

same timemultiple access protocolbull distributed algorithm that determines how nodes

share channel ie determine when node can transmit

bull communication about channel sharing must use channel itself

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 66: Data Communication Essentials

Ideal Multiple Access Protocol

Broadcast channel of rate R bps1 When one node wants to transmit it can send at

rate R2 When M nodes want to transmit each can send

at average rate RM3 Fully decentralized

ndash no special node to coordinate transmissionsndash no synchronization of clocks slots

4 Simple

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 67: Data Communication Essentials

MAC Protocols a taxonomyThree broad classesbull Channel Partitioning

ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)

ndash allocate piece to node for exclusive usebull Random Access

ndash channel not divided allow collisionsndash ldquorecoverrdquo from collisions

bull ldquoTaking turnsrdquondash Nodes take turns but nodes with more to send can

take longer turns

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 68: Data Communication Essentials

Channel Partitioning MAC protocols TDMA

TDMA time division multiple access bull access to channel in rounds bull each station gets fixed length slot (length =

pkt trans time) in each round bull unused slots go idle bull example 6-station LAN 134 have pkt slots

256 idle

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 69: Data Communication Essentials

Channel Partitioning MAC protocols FDMA

FDMA frequency division multiple access bull channel spectrum divided into frequency bandsbull each station assigned fixed frequency bandbull unused transmission time in frequency bands go idle bull example 6-station LAN 134 have pkt frequency bands 256 idle

frequ

ency

ban

ds

time

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 70: Data Communication Essentials

Random Access Protocolsbull When node has packet to send

ndash transmit at full channel data rate Rndash no a priori coordination among nodes

bull two or more transmitting nodes ldquocollisionrdquobull random access MAC protocol specifies

ndash how to detect collisionsndash how to recover from collisions (eg via delayed retransmissions)

bull Examples of random access MAC protocolsndash slotted ALOHAndash ALOHAndash CSMA CSMACD CSMACA

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 71: Data Communication Essentials

CSMA (Carrier Sense Multiple Access)

CSMA listen before transmitIf channel sensed idle transmit entire framebull If channel sensed busy defer transmission

bull Human analogy donrsquot interrupt others

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 72: Data Communication Essentials

CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted

spatial layout of nodes

noterole of distance amp propagation delay in determining collision probability

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 73: Data Communication Essentials

CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA

ndash collisions detected within short timendash colliding transmissions aborted reducing channel

wastage bull collision detection

ndash easy in wired LANs measure signal strengths compare transmitted received signals

ndash difficult in wireless LANs receiver shut off while transmitting

bull human analogy the polite conversationalist

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 74: Data Communication Essentials

CSMACD collision detection

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 75: Data Communication Essentials

Ethernet uses CSMACD

bull No slotsbull adapter doesnrsquot transmit if

it senses that some other adapter is transmitting that is carrier sense

bull transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

bull Before attempting a retransmission adapter waits a random time that is random access

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 76: Data Communication Essentials

Ethernet CSMACD algorithm1 Adaptor receives datagram

from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 77: Data Communication Essentials

Ethernetrsquos CSMACD (more)Jam Signal make sure all

other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff bull Goal adapt retransmission

attempts to estimated current loadndash heavy load random wait will

be longer

bull first collision choose K from 01 delay is K 512 bit transmission times

bull after second collision choose K from 0123hellip

bull after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 78: Data Communication Essentials

CSMACD efficiency (probabilistic)

bull Tprop = max prop between 2 nodes in LAN

bull ttrans = time to transmit max-size frame

bull Efficiency goes to 1 as tprop goes to 0

bull Goes to 1 as ttrans goes to infinity

transprop tt 511efficiency

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 79: Data Communication Essentials

References to Performance

bull Simon Lam A Carrier Sense Multiple Access Protocol for Local Networks Computer Networks Vol 4 pp 21-32 1980

bull D Bertsekas and R Gallagher Data Networks 2nd Ed Prentice Hall 1991

bull Possible paper project show an elegant derivation and compare to performance of Lelann algorithm

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 80: Data Communication Essentials

ldquoTaking Turnsrdquo MAC protocolschannel partitioning MAC protocols

ndash share channel efficiently and fairly at high loadndash inefficient at low load delay in channel access 1N

bandwidth allocated even if only 1 active node Random access MAC protocols

ndash efficient at low load single node can fully utilize channel

ndash high load collision overheadldquotaking turnsrdquo protocols

look for best of both worlds

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 81: Data Communication Essentials

ldquoTaking Turnsrdquo MAC protocolsPolling bull master node

ldquoinvitesrdquo slave nodes to transmit in turn

bull concernsndash polling overhead ndash latencyndash single point of

failure (master)

Token passingbull control token passed from

one node to next sequentially

bull token messagebull concerns

ndash token overhead ndash latencyndash single point of failure (token)

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 82: Data Communication Essentials

Summary of MAC protocols

bull What do you do with a shared mediandash Channel Partitioning by time frequency or

codebull Time Division Frequency Division

ndash Achieving real time guarantees distnotespdf

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 83: Data Communication Essentials

Wireless Networks

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 84: Data Communication Essentials

Chapter 6 Wireless and Mobile Networks

Background bull wireless (mobile) phone subscribers now

exceeds wired phone subscribersbull computer nets laptops palmtops PDAs

Internet-enabled phone promise anytime untethered Internet access

bull two important (but different) challengesndash communication over wireless linkndash handling mobile user who changes point of

attachment to network

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 85: Data Communication Essentials

Elements of a wireless network

network infrastructure

base stationbull typically connected to

wired networkbull relay - responsible for

sending packets between wired network and wireless host(s) in its ldquoareardquondash eg cell towers 80211

access points

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 86: Data Communication Essentials

Elements of a wireless network

network infrastructure

wireless linkbull typically used to connect

mobile(s) to base stationbull also used as backbone

link bull multiple access protocol

coordinates link access bull various data rates

transmission distance

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 87: Data Communication Essentials

Characteristics of selected wireless link standards

384 Kbps

56 Kbps

54 Mbps

5-11 Mbps

1 Mbps80215

80211b

80211ag

IS-95 CDMA GSM

UMTSWCDMA CDMA2000

11 p-to-p link

2G

3G

Indoor

10 ndash 30m

Outdoor

50 ndash 200m

Mid rangeoutdoor

200m ndash 4Km

Long rangeoutdoor

5Km ndash 20Km

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 88: Data Communication Essentials

Elements of a wireless network

network infrastructure

infrastructure modebull base station connects

mobiles into wired network

bull handoff mobile changes base station providing connection into wired network

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 89: Data Communication Essentials

Elements of a wireless networkAd hoc modebull no base stationsbull nodes can only transmit

to other nodes within link coverage

bull nodes organize themselves into a network route among themselves

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 90: Data Communication Essentials

IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff interval

repeat 2

80211 receiver- if frame received OK return ACK after SIFS (ACK needed due to

hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 91: Data Communication Essentials

Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random

access of data frames avoid collisions of long data framesbull sender first transmits small request-to-send (RTS) packets

to BS using CSMAndash RTSs may still collide with each other (but theyrsquore short)

bull BS broadcasts clear-to-send CTS in response to RTSbull RTS heard by all nodes

ndash sender transmits data framendash other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 92: Data Communication Essentials

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A) RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 93: Data Communication Essentials

How do you contact a mobile friend

bull search all phone books

bull call her parentsbull expect her to let you

know where heshe is

I wonder where Alice moved toConsider friend frequently changing

addresses how do you find her

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 94: Data Communication Essentials

Basic idea SIM card vs phone number

bull When Alice turns on her phone she registers her SIM card to local operator who records location

bull On Bobrsquos call Bobrsquos operator maps phone number to SIM

bull Second mapping from SIM to location

I know her phone number

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 95: Data Communication Essentials

Long Distance Mobility approachbull Let routing handle it routers advertise permanent

address of mobile-nodes-in-residence via routing table exchangendash routing tables indicate where each mobile locatedndash no changes to end-systems

bull Let end-systems handle it ndash indirect routing communication from correspondent to

mobile goes through home agent then forwarded to remote

ndash direct routing correspondent gets foreign address of mobile sends directly to mobile

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 96: Data Communication Essentials

Mobility registration

End resultbull Foreign agent knows about mobilebull Home agent knows location of mobile

wide area network

home network

visited network

1

mobile contacts foreign agent on entering visited network

2

foreign agent contacts home agent home ldquothis mobile is resident in my networkrdquo

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 97: Data Communication Essentials

Mobility via Indirect Routing

wide area network

homenetwork

visitednetwork

3

24

1correspondent addresses packets using home address of mobile

home agent intercepts packets forwards to foreign agent

foreign agent receives packets forwards to mobile

mobile replies directly to correspondent

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 98: Data Communication Essentials

Indirect Routing moving between networks

bull suppose mobile user moves to another networkndash registers with new foreign agentndash new foreign agent registers with home agentndash home agent update care-of-address for mobilendash packets continue to be forwarded to mobile (but

with new care-of-address)bull mobility changing foreign networks

transparent ongoing connections can be maintained

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 99: Data Communication Essentials

Reliable Transmission

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 100: Data Communication Essentials

rdt30 stop-and-wait operation

first packet bit transmitted t = 0

sender receiver

RTT

last packet bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

U sender = 008

30008 = 000027

microseconds

L R RTT + L R

=

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 101: Data Communication Essentials

Pipelined protocolsPipelining sender allows multiple ldquoin-flightrdquo

yet-to-be-acknowledged pktsndash range of sequence numbers must be increasedndash buffering at sender andor receiver

bull Two generic forms of pipelined protocols go-Back-N selective repeat

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 102: Data Communication Essentials

Pipelining (by factor of 3)first packet bit transmitted t = 0

sender receiver

RTT

last bit transmitted t = L R

first packet bit arriveslast packet bit arrives send ACK

ACK arrives send next packet t = RTT + L R

last bit of 2nd packet arrives send ACKlast bit of 3rd packet arrives send ACK

U sender = 024

30008 = 00008

microseconds

3 L R RTT + L R

=

Increase utilizationby a factor of 3

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 103: Data Communication Essentials

Go-Back-NSenderbull k-bit seq in pkt headerbull ldquowindowrdquo of up to N consecutive unackrsquoed pkts allowed

bull ACK(n) ACKs all pkts up to including seq n - ldquocumulative ACKrdquondash may receive duplicate ACKs (see receiver)

bull timer for each in-flight pktbull timeout(n) retransmit pkt n and all higher seq pkts in window

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 104: Data Communication Essentials

Selective Repeatbull receiver individually acknowledges all

correctly received pktsndash buffers pkts as needed for eventual in-order

delivery to upper layerbull sender only resends pkts for which ACK not

receivedndash sender timer for each unACKed pkt

bull sender windowndash N consecutive seq rsquosndash again limits seq s of sent unACKed pkts

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 105: Data Communication Essentials

Selective repeat sender receiver windows

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 106: Data Communication Essentials

Look at global negative acknowledgment scheme

bull Negative acknowledgment protocol along with token passing in distcompppt

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 107: Data Communication Essentials

Network Layer circuit switching vs packet

switching

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 108: Data Communication Essentials

Switching Networks

bull Long distance transmission is typically done over a network of switched nodes

bull Nodes not concerned with content of databull End devices are stations

ndash Computer terminal phone etcbull A collection of nodes and connections is a

communications networkbull Data routed by being switched from node to

node

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 109: Data Communication Essentials

Technology

bull Two different switching technologiesndash Circuit switchingndash Packet switching

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 110: Data Communication Essentials

Simple Switched Network

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 111: Data Communication Essentials

Circuit Switching

bull Dedicated communication path between two stations (during conversation)

bull Three phasesndash Establishndash Transferndash Disconnect

bull Must have switching capacity and channel capacity to establish connection

bull Must have intelligence to work out routing

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 112: Data Communication Essentials

Circuit Switching - Issues

bull Circuit switching is inefficient (designed for voice)ndash Resources dedicated to a particular callndash Much of the time a data connection is idlendash Data rate is fixed

bull Both ends must operate at the same rate

bull Set up (connection) takes timebull Once connected transfer is transparent

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 113: Data Communication Essentials

Packet Switching

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 114: Data Communication Essentials

Basic Operation

bull Data transmitted in small packetsndash Typically 1000 octetsndash Longer messages split into series of packetsndash Each packet contains a portion of user data plus some

control infobull Control info

ndash Routing (addressing) infobull Packets are received stored briefly (buffered) and

passed on to the next nodendash Store and forward

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 115: Data Communication Essentials

Use of Packets

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 116: Data Communication Essentials

Network layerbull transport segment from sending to receiving host bull on sending side encapsulates segments into

datagramsbull on rcving side delivers segments to transport layerbull network layer protocols in every host routerbull Router examines header fields in all IP datagrams

passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 117: Data Communication Essentials

Key Network-Layer Functions

bull forwarding move packets from routerrsquos input to appropriate router output

bull routing determine route taken by packets from source to dest

ndash Routing algorithms

analogy

bull routing process of planning trip from source to dest

bull forwarding process of getting through single interchange

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 118: Data Communication Essentials

1

23

0111

value in arrivingpacketrsquos header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 119: Data Communication Essentials

Many different interconnection topologies

bull Pointer to interconnectionppt

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 120: Data Communication Essentials

Virtual circuit vs datagram networks

(Shasha students read on your own)

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 121: Data Communication Essentials

Network layer connection and connection-less service

bull Datagram network provides network-layer connectionless service

bull VC network provides network-layer connection service

bull Analogous to the transport-layer services butndash Service host-to-hostndash No choice network provides one or the otherndash Implementation in the core

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 122: Data Communication Essentials

Virtual circuits

bull call setup teardown for each call before data can flowbull each packet carries VC identifier (not destination host address)bull every router on source-dest path maintains ldquostaterdquo for each

passing connectionbull link router resources (bandwidth buffers) may be allocated to

VC

ldquosource-to-dest path behaves much like telephone circuitrdquondash performance-wisendash network actions along source-to-dest path

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 123: Data Communication Essentials

VC implementation

A VC consists of1 Path from source to destination2 VC numbers one number for each link along path3 Entries in forwarding tables in routers along path

bull Packet belonging to VC carries a VC numberbull VC number must be changed on each link

ndash New VC number comes from forwarding table

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 124: Data Communication Essentials

Forwarding table12 22 32

1 2 3

VC number

interfacenumber

Incoming interface Incoming VC Outgoing interface Outgoing VC

1 12 2 222 63 1 18 3 7 2 171 97 3 87hellip hellip hellip hellip

Forwarding table innorthwest router

Routers maintain connection state information

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 125: Data Communication Essentials

Virtual circuits signaling protocols

bull used to setup maintain teardown VCbull used in ATM frame-relay X25bull not used in todayrsquos Internet

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Initiate call 2 incoming call3 Accept call4 Call connected

5 Data flow begins 6 Receive data

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 126: Data Communication Essentials

Datagram networksbull no call setup at network layerbull routers no state about end-to-end connections

ndash no network-level concept of ldquoconnectionrdquobull packets forwarded using destination host address

ndash packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1 Send data 2 Receive data

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 127: Data Communication Essentials

Datagram or VC network why

Internetbull data exchange among

computersndash ldquoelasticrdquo service no strict

timing req bull ldquosmartrdquo end systems (computers)

ndash can adapt perform control error recovery

ndash simple inside network complexity at ldquoedgerdquo

bull many link types ndash different characteristicsndash uniform service difficult

ATMbull evolved from telephonybull human conversation

ndash strict timing reliability requirements

ndash need for guaranteed service

bull ldquodumbrdquo end systemsndash telephonesndash complexity inside

network

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 128: Data Communication Essentials

The Internet Network layer

forwardingtable

Host router network layer functions

Routing protocolsbullpath selectionbullRIP OSPF BGP

IP protocolbulladdressing conventionsbulldatagram formatbullpacket handling conventions

ICMP protocolbullerror reportingbullrouter ldquosignalingrdquo

Transport layer TCP UDP

Link layer

physical layer

Networklayer

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 129: Data Communication Essentials

Routing

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 130: Data Communication Essentials

Routing Strategies

bull Fixedbull Floodingbull Randombull Adaptive

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 131: Data Communication Essentials

Fixed Routing

bull Single permanent route for each source to destination pair

bull Determine routes using a least cost algorithm

bull Route fixed at least until a change in network topology

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 132: Data Communication Essentials

Fixed RoutingTables

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 133: Data Communication Essentials

Floodingbull No network info requiredbull Packet sent by node to every neighborbull Incoming packets retransmitted on every link except

incoming linkbull Eventually a number of copies will arrive at destinationbull Each packet is uniquely numbered so duplicates can

be discardedbull Nodes can remember packets already forwarded to

keep network load in boundsbull Can include a hop count in packets

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 134: Data Communication Essentials

Flooding Example

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 135: Data Communication Essentials

Properties of Flooding

bull All possible routes are triedndash Very robust

bull At least one packet will have taken minimum hop count routendash Can be used to set up virtual circuit

bull All nodes are visitedndash Useful to distribute information (eg routing)

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 136: Data Communication Essentials

Random Routing

bull Node selects one outgoing path for retransmission of incoming packet

bull Selection can be random or round robinbull Can select outgoing path based on

probability calculationbull No network info neededbull Route is typically not least cost nor

minimum hop

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 137: Data Communication Essentials

Adaptive Routingbull Used by almost all packet switching networksbull Routing decisions change as conditions on the

network changendash Failurendash Congestion

bull Requires info about networkbull Decisions more complexbull Tradeoff between quality of network info and overheadbull Reacting too quickly can cause oscillation (bathtub)bull Reacting too slowly can create irrelevance

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 138: Data Communication Essentials

Routing Algorithm classification

Global or decentralized information

Globalbull all routers have complete

topology link cost infobull ldquolink staterdquo algorithmsDecentralized bull router knows physically-

connected neighbors link costs to neighbors

bull iterative process of computation exchange of info with neighbors

bull ldquodistance vectorrdquo algorithms

Static or dynamicStatic bull routes change slowly

over timeDynamic bull routes change more

quicklyndash periodic updatendash in response to link

cost changes

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 139: Data Communication Essentials

A Link-State Routing Algorithm

Dijkstrarsquos algorithmbull net topology link costs known

to all nodesndash accomplished via ldquolink

state broadcastrdquo ndash all nodes have same info

bull computes least cost paths from one node (lsquosourcerdquo) to all other nodesndash gives forwarding table for

that nodebull iterative after k iterations

know least cost path to k destrsquos

Notationbull c(xy) link cost from node x to

y = infin if not direct neighborsbull D(v) current value of cost of

path from source to dest vbull p(v) predecessor node along

path from source to vbull N set of nodes whose least

cost path definitively known

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 140: Data Communication Essentials

Dijsktrarsquos Algorithm1 Initialization 2 N = u 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(uv) 6 else D(v) = infin 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N 12 D(v) = min( D(v) D(w) + c(wv) ) 13 new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v 15 until all nodes in N

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 141: Data Communication Essentials

Distance vector algorithm Basic idea bull Each node periodically sends its own distance vector

estimate to neighborsbull When node a node x receives new DV estimate from

neighbor it updates its own DV using B-F equation

Dx(y) larr minvc(xv) + Dv(y) for each node y ∊ N

bull Under minor natural conditions the estimate Dx(y) converge the actual least cost dx(y)

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 142: Data Communication Essentials

Distance Vector Algorithm Properties

Iterative asynchronous each local iteration caused by

bull local link cost change bull DV update message from

neighbor

Distributedbull each node notifies

neighbors only when its DV changesndash neighbors then notify their

neighbors if necessary

wait for (change in local link cost of msg from neighbor)

recompute estimates

if DV to any dest has changed notify neighbors

Each node

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 143: Data Communication Essentials

Hierarchical OSPF

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 144: Data Communication Essentials

Hierarchical OSPFbull Two-level hierarchy local area backbone

ndash Link-state advertisements only in area ndash each nodes has detailed area topology only know

direction (shortest path) to nets in other areasbull Area border routers ldquosummarizerdquo distances to nets

in own area advertise to other Area Border routersbull Backbone routers run OSPF routing limited to

backbonebull Boundary routers connect to other ASrsquos

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 145: Data Communication Essentials

Internet inter-AS routing BGP

bull BGP (Border Gateway Protocol) the de facto standard

bull BGP provides each AS a means to1Obtain subnet reachability information from

neighboring ASs2Propagate the reachability information to all routers

internal to the AS3Determine ldquogoodrdquo routes to subnets based on

reachability information and policybull Allows a subnet to advertise its existence to

rest of the Internet ldquoI am hererdquo

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing
Page 146: Data Communication Essentials

Why different Intra- and Inter-AS routing Policy bull Inter-AS admin wants control over how its traffic

routed who routes through its net bull Intra-AS single admin so no policy decisions needed

Scalebull hierarchical routing saves table size reduced update

trafficPerformance bull Intra-AS can focus on performancebull Inter-AS policy may dominate over performance

  • Data Communication Essentials
  • A Communications Model
  • Simplified Communications Model - Diagram
  • Key Communications Tasks
  • Networking
  • Simplified Network Model
  • The Network Core
  • Network Core Circuit Switching
  • Circuit Switching FDM and TDM
  • Network Core Packet Switching
  • Packet Switching Statistical Multiplexing
  • Packet switching versus circuit switching
  • Local Area Networks
  • Protocols
  • Key Elements of a Protocol
  • Whatrsquos a protocol
  • Slide 17
  • In Summary a protocol is
  • Protocol Specification
  • Event -Time Diagrams
  • Transition Diagram
  • Protocol ldquoLayersrdquo
  • Why layering
  • Internet protocol stack
  • Encapsulation
  • OSI
  • How do loss and delay occur
  • Four sources of packet delay
  • Delay in packet-switched networks
  • Data Communication and Networks
  • Simplified Data Communications Model
  • Slide 32
  • Terminology (1)
  • Terminology (2)
  • Terminology (3)
  • Analog and Digital Data Transmission
  • Data
  • Signals
  • Data and Signals
  • Analog Transmission
  • Digital Transmission
  • Advantages amp Disadvantages of Digital
  • Attenuation of Digital Signals
  • Interpreting Signals
  • Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted
  • NRZ
  • Differential Encoding
  • Biphase
  • Biphase Pros and Cons
  • Asynchronous
  • Asynchronous (diagram)
  • Asynchronous - Behavior
  • Synchronous - Bit Level
  • Synchronous - Block Level
  • Synchronous (diagram)
  • Synchronous Bit Error Detection
  • Data Link Layer
  • Link Layer Services
  • Encoding Information Frames
  • Error Detection
  • Parity Checking
  • Internet checksum
  • Multiple Access protocols
  • Ideal Multiple Access Protocol
  • MAC Protocols a taxonomy
  • Channel Partitioning MAC protocols TDMA
  • Channel Partitioning MAC protocols FDMA
  • Random Access Protocols
  • CSMA (Carrier Sense Multiple Access)
  • CSMA collisions
  • CSMACD (Collision Detection)
  • CSMACD collision detection
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency (probabilistic)
  • References to Performance
  • ldquoTaking Turnsrdquo MAC protocols
  • Slide 81
  • Summary of MAC protocols
  • Wireless Networks
  • Chapter 6 Wireless and Mobile Networks
  • Elements of a wireless network
  • Slide 86
  • Characteristics of selected wireless link standards
  • Slide 88
  • Slide 89
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • How do you contact a mobile friend
  • Basic idea SIM card vs phone number
  • Long Distance Mobility approach
  • Mobility registration
  • Mobility via Indirect Routing
  • Indirect Routing moving between networks
  • Reliable Transmission
  • rdt30 stop-and-wait operation
  • Pipelined protocols
  • Pipelining (by factor of 3)
  • Go-Back-N
  • Selective Repeat
  • Selective repeat sender receiver windows
  • Look at global negative acknowledgment scheme
  • Network Layer circuit switching vs packet switching
  • Switching Networks
  • Technology
  • Simple Switched Network
  • Circuit Switching
  • Circuit Switching - Issues
  • Packet Switching
  • Basic Operation
  • Use of Packets
  • Network layer
  • Key Network-Layer Functions
  • Slide 118
  • Many different interconnection topologies
  • Virtual circuit vs datagram networks (Shasha students read on your own)
  • Network layer connection and connection-less service
  • Virtual circuits
  • VC implementation
  • Forwarding table
  • Virtual circuits signaling protocols
  • Datagram networks
  • Datagram or VC network why
  • The Internet Network layer
  • Routing
  • Routing Strategies
  • Fixed Routing
  • Fixed Routing Tables
  • Flooding
  • Flooding Example
  • Properties of Flooding
  • Random Routing
  • Adaptive Routing
  • Routing Algorithm classification
  • A Link-State Routing Algorithm
  • Dijsktrarsquos Algorithm
  • Distance vector algorithm
  • Distance Vector Algorithm Properties
  • Hierarchical OSPF
  • Slide 144
  • Internet inter-AS routing BGP
  • Why different Intra- and Inter-AS routing