Data Communication Essentials - PowerPoint PPT Presentation

About This Presentation
Title:

Data Communication Essentials

Description:

Destination. Takes incoming data. Simplified Communications Model - Diagram ... Both directions at the same time. e.g. telephone. Analog and Digital Data Transmission ... – PowerPoint PPT presentation

Number of Views:134
Avg rating:3.0/5.0
Slides: 147
Provided by: s629
Category:

less

Transcript and Presenter's Notes

Title: Data Communication Essentials


1
Data Communication Essentials
  • Excerpted from Joe Conrons data communications
    course

2
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
  • Destination
  • Takes incoming data

3
Simplified Communications Model - Diagram
4
Key Communications Tasks
  • Transmission System Utilization
  • Interfacing
  • Signal Generation
  • Synchronization
  • Error detection and correction
  • Addressing and routing
  • Recovery
  • Message formatting
  • Security
  • Network Management

5
Networking
  • Point to point communication not usually
    practical
  • Devices are too far apart
  • Large set of devices would need impractical
    number of connections
  • Solution is a communications network

6
Simplified Network Model
7
The Network Core
  • mesh of interconnected routers
  • the fundamental question how is data transferred
    through net?
  • circuit switching dedicated circuit per call
    telephone net
  • packet-switching data sent thru net in discrete
    chunks

8
Network Core Circuit Switching
  • End-end resources reserved for call
  • link bandwidth, switch capacity
  • dedicated resources no sharing
  • circuit-like (guaranteed) performance
  • call setup required

9
Circuit Switching FDM and TDM
10
Network Core Packet Switching
  • each end-end data stream divided into packets
  • user A, B packets share network resources
  • each packet uses full link bandwidth
  • resources used as needed
  • resource contention
  • aggregate resource demand can exceed amount
    available
  • congestion packets queue, wait for link use
  • store and forward packets move one hop at a time
  • Node receives complete packet before forwarding

11
Packet Switching Statistical Multiplexing
10 Mb/s Ethernet
C
A
statistical multiplexing
1.5 Mb/s
B
queue of packets waiting for output link
  • Sequence of A B packets does not have fixed
    pattern ? statistical multiplexing.
  • In TDM each host gets same slot in revolving TDM
    frame.

12
Packet switching versus circuit switching
  • Is packet switching a slam dunk winner?
  • Great for bursty data
  • resource sharing
  • simpler, no call setup
  • Excessive congestion packet delay and loss
  • protocols needed for reliable data transfer,
    congestion control
  • Q How to provide circuit-like behavior?
  • bandwidth guarantees needed for audio/video apps
  • still an unsolved problem (chapter 6)

13
Local Area Networks
  • Smaller scope
  • Building or small campus
  • Usually owned by same organization as attached
    devices
  • Data rates much higher
  • Usually broadcast systems

14
Protocols
  • Used for communications between entities in a
    system
  • Must speak the same language
  • Entities
  • User applications
  • e-mail facilities
  • terminals
  • Systems
  • Computer
  • Terminal
  • Remote sensor

15
Key Elements of a Protocol
  • Syntax
  • Data formats
  • Signal levels
  • Semantics
  • Control information
  • Error handling
  • Timing
  • Speed matching
  • Sequencing

16
Whats a protocol?
  • human protocols
  • whats the time?
  • I have a question
  • introductions
  • specific msgs sent
  • specific actions taken when msgs received, or
    other events
  • network protocols
  • machines rather than humans
  • 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
17
Whats a protocol?
  • a human protocol and a computer network protocol

Hi
TCP connection req.
Hi
18
In Summary, a protocol is ....
  • An agreement about communication between two or
    more entities
  • It specifies
  • Format of messages
  • Meaning of messages
  • Rules for exchange
  • Procedures for handling problems

19
Protocol Specification
  • As designers, we can specify a protocol using
  • Event-Time Diagrams
  • Transition Diagrams
  • We can implement a protocol with a Finite State
    Machine (FSM)
  • Internet Protocols are formalized by RFCs which
    are administered by IETF
  • You can find any RFC here

20
Event -Time Diagrams
  • Define causal ordering
  • Define indication/request/response actions

21
Transition Diagram
  • Illustrates
  • States
  • Input (the Event that causes transition)
  • Transitions (to new states)

22
Protocol Layers
  • Networks are complex!
  • many pieces
  • hosts
  • routers
  • links of various media
  • applications
  • protocols
  • hardware, software
  • Question
  • Is there any hope of organizing structure of
    network?
  • Or at least our discussion of networks?

23
Why layering?
  • Dealing with complex systems
  • explicit structure allows identification,
    relationship of complex systems pieces
  • layered reference model for discussion
  • modularization eases maintenance, updating of
    system
  • change of implementation of layers service
    transparent to rest of system
  • e.g., change in gate procedure doesnt affect
    rest of system
  • Can layering sometimes be undesirable?

24
Internet protocol stack
  • application supporting network applications
  • FTP, SMTP, HTTP
  • transport process-process data transfer
  • TCP, UDP
  • network routing of datagrams from source to
    destination
  • IP, routing protocols
  • link data transfer between neighboring network
    elements
  • PPP, Ethernet
  • physical bits on the wire

25
Encapsulation
source
message
application transport network link physical
segment
datagram
frame
switch
destination
application transport network link physical
router
26
OSI
  • Open Systems Interconnection
  • Developed by the International Organization for
    Standardization (ISO)
  • Seven layers
  • A theoretical system delivered too late!
  • TCP/IP is the de facto standard

27
How do loss and delay occur?
  • packets queue in router buffers
  • packet arrival rate to link exceeds output link
    capacity
  • packets queue, wait for turn

A
B
28
Four sources of packet delay
  • 1. nodal processing
  • check bit errors
  • determine output link
  • 2. queueing
  • time waiting at output link for transmission
  • depends on congestion level of router

29
Delay in packet-switched networks
  • 3. Transmission delay
  • Rlink bandwidth (bps)
  • Lpacket length (bits)
  • time to send bits into link L/R
  • 4. Propagation delay
  • d length of physical link
  • s propagation speed in medium (2x108 m/sec)
  • propagation delay d/s

Note s and R are very different quantities!
30
Data Communication and Networks
  • Lecture 2
  • Data Transmission and Encoding Concepts
  • September 14, 2006

31
Simplified Data Communications Model
32
S(t) A sin(2?ft F)
33
Terminology (1)
  • Transmitter
  • Receiver
  • Medium
  • Guided medium
  • e.g. twisted pair, optical fiber
  • Unguided medium
  • e.g. air, water, vacuum

34
Terminology (2)
  • Direct link
  • No intermediate devices
  • Point-to-point
  • Direct link
  • Only 2 devices share link
  • Multi-point
  • More than two devices share the link

35
Terminology (3)
  • Simplex
  • One direction
  • e.g. Television
  • Half duplex
  • Either direction, but only one way at a time
  • e.g. police radio
  • Full duplex
  • Both directions at the same time
  • e.g. telephone

36
Analog and Digital Data Transmission
  • Data
  • Entities that convey meaning
  • Signals
  • Electric or electromagnetic representations of
    data
  • Transmission
  • Communication of data by propagation and
    processing of signals

37
Data
  • Analog
  • Continuous values within some interval
  • e.g. sound, video
  • Digital
  • Discrete values
  • e.g. text, integers

38
Signals
  • Means by which data are propagated
  • Analog
  • Continuously variable
  • Various media
  • wire, fiber optic, space
  • Speech bandwidth 100Hz to 7kHz
  • Telephone bandwidth 300Hz to 3400Hz
  • Video bandwidth 4MHz
  • Digital
  • Use two DC components

39
Data and Signals
  • Usually use digital signals for digital data and
    analog signals for analog data
  • Can use analog signal to carry digital data
  • Modem
  • Can use digital signal to carry analog data
  • Compact Disc audio

40
Analog Transmission
  • Analog signal transmitted without regard to
    content
  • May be analog or digital data
  • Attenuated over distance
  • Use amplifiers to boost signal
  • Also amplifies noise

41
Digital Transmission
  • Concerned with content
  • Integrity endangered by noise, attenuation etc.
  • Repeaters used
  • Repeater receives signal
  • Extracts bit pattern
  • Retransmits
  • Attenuation is overcome
  • Noise is not amplified

42
Advantages Disadvantages of Digital
  • Cheaper
  • Less susceptible to noise
  • Greater attenuation
  • Pulses become rounded and smaller
  • Leads to loss of information

43
Attenuation of Digital Signals
44
Interpreting Signals
  • Need to know
  • Timing of bits - when they start and end
  • Signal levels
  • Factors affecting successful interpreting of
    signals
  • Signal to noise ratio
  • Data rate
  • Bandwidth

45
Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted (NRZI)
  • Bipolar -AMI
  • Pseudoternary
  • Manchester
  • Differential Manchester
  • B8ZS
  • HDB3

46
Nonreturn to Zero-Level (NRZ-L)
  • Two different voltages for 0 and 1 bits
  • Voltage constant during bit interval
  • no transition I.e. no return to zero voltage
  • e.g. Absence of voltage for zero, constant
    positive voltage for one
  • More often, negative voltage for one value and
    positive for the other
  • This is NRZ-L

47
Nonreturn to Zero Inverted
  • Nonreturn to zero inverted on ones
  • Constant voltage pulse for duration of bit
  • Data encoded as presence or absence of signal
    transition at beginning of bit time
  • Transition (low to high or high to low) denotes a
    binary 1
  • No transition denotes binary 0
  • An example of differential encoding

48
NRZ
49
Differential Encoding
  • Data represented by changes rather than levels
  • More reliable detection of transition rather than
    level
  • However in complex transmission layouts it is
    easy to lose sense of polarity

50
Biphase
  • Manchester
  • Transition in middle of each bit period
  • Transition serves as clock and data
  • Low to high represents one
  • High to low represents zero
  • Used by IEEE 802.3
  • Differential Manchester
  • Midbit transition is clocking only
  • Transition at start of a bit period represents
    zero
  • No transition at start of a bit period represents
    one
  • Note this is a differential encoding scheme
  • Used by IEEE 802.5

51
Biphase Pros and Cons
  • Con
  • At least one transition per bit time and possibly
    two
  • Maximum modulation rate is twice NRZ
  • Requires more bandwidth
  • Pros
  • Synchronization on mid bit transition (self
    clocking)

52
Asynchronous
  • Data transmitted one character at a time
  • 5 to 8 bits
  • Timing only needs maintaining within each
    character
  • Resync with each character

53
Asynchronous (diagram)
54
Asynchronous - Behavior
  • In a steady stream, interval between characters
    is uniform (length of stop element)
  • In idle state, receiver looks for transition 1 to
    0
  • Then samples next seven intervals (char length)
  • Then looks for next 1 to 0 for next char
  • Overhead of 2 or 3 bits per char (20)
  • Good for data with large gaps (keyboard)

55
Synchronous - Bit Level
  • Block of data transmitted without start or stop
    bits
  • Clocks must be synchronized
  • Can use separate clock line
  • Good over short distances
  • Subject to impairments
  • Embed clock signal in data
  • Manchester encoding
  • Carrier frequency (analog)

56
Synchronous - Block Level
  • Need to indicate start and end of block
  • Use preamble and postamble
  • e.g. series of SYN (hex 16) characters
  • e.g. block of 11111111 patterns ending in
    11111110
  • More efficient (lower overhead) than async

57
Synchronous (diagram)
58
Synchronous Bit Error Detection
  • Which kinds of errors can we handle if we have
    synchronous bit transfer?
  • Reference to bit transmission protocol in
    distcomp.ppt

59
Data Link Layer
  • Excerpted from Joe Conrons notes

60
Link Layer Services
  • Framing, link access
  • encapsulate datagram into frame, adding header,
    trailer
  • channel access if shared medium
  • MAC addresses used in frame headers to identify
    source, dest
  • different from IP address!

61
Encoding Information Frames
Typical Fields in a Frame
Start Frame Delimiter
Source Address
Destination Address
Frame Control
Check sum
Data
62
Error Detection
  • Additional bits added by transmitter for error
    detection code
  • Parity
  • Value of parity bit is such that character has
    even (even parity) or odd (odd parity) number of
    ones
  • Even number of bit errors goes undetected
  • Checksum can be a simple XOR operation of bits to
    be checked

63
Parity Checking
Two Dimensional Bit Parity Detect and correct
single bit errors
Single Bit Parity Detect single bit errors
0
0
64
Internet checksum
  • Goal detect errors (e.g., flipped bits) in
    transmitted segment (note used at transport
    layer only)
  • Receiver
  • compute checksum of received segment
  • check if computed checksum equals checksum field
    value
  • NO - error detected
  • YES - no error detected. But maybe errors
    nonetheless? More later .
  • Sender
  • treat segment contents as sequence of 16-bit
    integers
  • checksum addition (1s complement sum) of
    segment contents
  • sender puts checksum value into UDP checksum
    field

65
Multiple Access protocols
  • single shared broadcast channel
  • two or more simultaneous transmissions by nodes
    interference
  • collision if node receives two or more signals at
    the same time
  • multiple access protocol
  • distributed algorithm that determines how nodes
    share channel, i.e., determine when node can
    transmit
  • communication about channel sharing must use
    channel itself!

66
Ideal Multiple Access Protocol
  • Broadcast channel of rate R bps
  • 1. When one node wants to transmit, it can send
    at rate R.
  • 2. When M nodes want to transmit, each can send
    at average rate R/M
  • 3. Fully decentralized
  • no special node to coordinate transmissions
  • no synchronization of clocks, slots
  • 4. Simple

67
MAC Protocols a taxonomy
  • Three broad classes
  • Channel Partitioning
  • divide channel into smaller pieces (time slots,
    frequency, code)
  • allocate piece to node for exclusive use
  • Random Access
  • channel not divided, allow collisions
  • recover from collisions
  • Taking turns
  • Nodes take turns, but nodes with more to send can
    take longer turns

68
Channel Partitioning MAC protocols TDMA
  • TDMA time division multiple access
  • access to channel in "rounds"
  • each station gets fixed length slot (length pkt
    trans time) in each round
  • unused slots go idle
  • example 6-station LAN, 1,3,4 have pkt, slots
    2,5,6 idle

69
Channel Partitioning MAC protocols FDMA
  • FDMA frequency division multiple access
  • channel spectrum divided into frequency bands
  • each station assigned fixed frequency band
  • unused transmission time in frequency bands go
    idle
  • example 6-station LAN, 1,3,4 have pkt, frequency
    bands 2,5,6 idle

time
frequency bands
70
Random Access Protocols
  • When node has packet to send
  • transmit at full channel data rate R.
  • no a priori coordination among nodes
  • two or more transmitting nodes ? collision,
  • random access MAC protocol specifies
  • how to detect collisions
  • how to recover from collisions (e.g., via delayed
    retransmissions)
  • Examples of random access MAC protocols
  • slotted ALOHA
  • ALOHA
  • CSMA, CSMA/CD, CSMA/CA

71
CSMA (Carrier Sense Multiple Access)
  • CSMA listen before transmit
  • If channel sensed idle transmit entire frame
  • If channel sensed busy, defer transmission
  • Human analogy dont interrupt others!

72
CSMA collisions
spatial layout of nodes
collisions can still occur propagation delay
means two nodes may not hear each others
transmission
collision entire packet transmission time wasted
note role of distance propagation delay in
determining collision probability
73
CSMA/CD (Collision Detection)
  • CSMA/CD carrier sensing, deferral as in CSMA
  • collisions detected within short time
  • colliding transmissions aborted, reducing channel
    wastage
  • collision detection
  • easy in wired LANs measure signal strengths,
    compare transmitted, received signals
  • difficult in wireless LANs receiver shut off
    while transmitting
  • human analogy the polite conversationalist

74
CSMA/CD collision detection
75
Ethernet uses CSMA/CD
  • No slots
  • adapter doesnt transmit if it senses that some
    other adapter is transmitting, that is, carrier
    sense
  • transmitting adapter aborts when it senses that
    another adapter is transmitting, that is,
    collision detection
  • Before attempting a retransmission, adapter waits
    a random time, that is, random access

76
Ethernet CSMA/CD algorithm
  • 1. Adaptor receives datagram from net layer
    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 0,1,2,,2m-1. Adapter waits
    K?512 bit times and returns to Step 2

77
Ethernets CSMA/CD (more)
  • Jam Signal make sure all other transmitters are
    aware of collision 48 bits
  • Bit time .1 microsec for 10 Mbps Ethernet for
    K1023, wait time is about 50 msec
  • Exponential Backoff
  • Goal adapt retransmission attempts to estimated
    current load
  • heavy load random wait will be longer
  • first collision choose K from 0,1 delay is K?
    512 bit transmission times
  • after second collision choose K from 0,1,2,3
  • after ten collisions, choose K from
    0,1,2,3,4,,1023

See/interact with Java applet on AWL Web
site highly recommended !
78
CSMA/CD efficiency (probabilistic)
  • Tprop max prop between 2 nodes in LAN
  • ttrans time to transmit max-size frame
  • Efficiency goes to 1 as tprop goes to 0
  • Goes to 1 as ttrans goes to infinity

79
References to Performance
  • Simon Lam "A Carrier Sense Multiple Access
    Protocol for Local Networks", Computer Networks,
    Vol 4, pp 21-32, 1980.
  • D. Bertsekas and R. Gallagher, Data Networks,
    2nd Ed., Prentice Hall, 1991
  • Possible paper project show an elegant
    derivation and compare to performance of Lelann
    algorithm.

80
Taking Turns MAC protocols
  • channel partitioning MAC protocols
  • share channel efficiently and fairly at high load
  • inefficient at low load delay in channel access,
    1/N bandwidth allocated even if only 1 active
    node!
  • Random access MAC protocols
  • efficient at low load single node can fully
    utilize channel
  • high load collision overhead
  • taking turns protocols
  • look for best of both worlds!

81
Taking Turns MAC protocols
  • Token passing
  • control token passed from one node to next
    sequentially.
  • token message
  • concerns
  • token overhead
  • latency
  • single point of failure (token)
  • Polling
  • master node invites slave nodes to transmit in
    turn
  • concerns
  • polling overhead
  • latency
  • single point of failure (master)

82
Summary of MAC protocols
  • What do you do with a shared media?
  • Channel Partitioning, by time, frequency or code
  • Time Division, Frequency Division
  • Achieving real time guarantees distnotes.pdf

83
Wireless Networks
84
Chapter 6 Wireless and Mobile Networks
  • Background
  • wireless (mobile) phone subscribers now exceeds
    wired phone subscribers!
  • computer nets laptops, palmtops, PDAs,
    Internet-enabled phone promise anytime untethered
    Internet access
  • two important (but different) challenges
  • communication over wireless link
  • handling mobile user who changes point of
    attachment to network

85
Elements of a wireless network
86
Elements of a wireless network
  • wireless link
  • typically used to connect mobile(s) to base
    station
  • also used as backbone link
  • multiple access protocol coordinates link access
  • various data rates, transmission distance

87
Characteristics of selected wireless link
standards
54 Mbps
802.11a,g
5-11 Mbps
.11 p-to-p link
802.11b
1 Mbps
802.15
3G
384 Kbps
UMTS/WCDMA, CDMA2000
2G
56 Kbps
IS-95 CDMA, GSM
88
Elements of a wireless network
89
Elements of a wireless network
  • Ad hoc mode
  • no base stations
  • nodes can only transmit to other nodes within
    link coverage
  • nodes organize themselves into a network route
    among themselves

90
IEEE 802.11 MAC Protocol CSMA/CA
  • 802.11 sender
  • 1 if sense channel idle for DIFS then
  • transmit entire frame (no CD)
  • 2 if sense channel busy then
  • start random backoff time
  • timer counts down while channel idle
  • transmit when timer expires
  • if no ACK, increase random backoff interval,
    repeat 2
  • 802.11 receiver
  • - if frame received OK
  • return ACK after SIFS (ACK needed due to
    hidden terminal problem)

sender
receiver
91
Avoiding collisions (more)
  • idea allow sender to reserve channel rather
    than random access of data frames avoid
    collisions of long data frames
  • sender first transmits small request-to-send
    (RTS) packets to BS using CSMA
  • RTSs may still collide with each other (but
    theyre short)
  • BS broadcasts clear-to-send CTS in response to
    RTS
  • RTS heard by all nodes
  • sender transmits data frame
  • other stations defer transmissions

Avoid data frame collisions completely using
small reservation packets!
92
Collision Avoidance RTS-CTS exchange
A
B
AP
defer
time
93
How do you contact a mobile friend
I wonder where Alice moved to?
Consider friend frequently changing addresses,
how do you find her?
  • search all phone books?
  • call her parents?
  • expect her to let you know where he/she is?

94
Basic idea SIM card vs. phone number
I know her phone number
  • When Alice turns on her phone, she registers her
    SIM card to local operator who records location.
  • On Bobs call, Bobs operator maps phone number
    to SIM.
  • Second mapping from SIM to location.

95
Long Distance Mobility approach
  • Let routing handle it routers advertise
    permanent address of mobile-nodes-in-residence
    via routing table exchange.
  • routing tables indicate where each mobile located
  • no changes to end-systems
  • Let end-systems handle it
  • indirect routing communication from
    correspondent to mobile goes through home agent,
    then forwarded to remote
  • direct routing correspondent gets foreign
    address of mobile, sends directly to mobile

96
Mobility registration
visited network
home network
wide area network
  • End result
  • Foreign agent knows about mobile
  • Home agent knows location of mobile

97
Mobility via Indirect Routing
visited network
home network
wide area network
98
Indirect Routing moving between networks
  • suppose mobile user moves to another network
  • registers with new foreign agent
  • new foreign agent registers with home agent
  • home agent update care-of-address for mobile
  • packets continue to be forwarded to mobile (but
    with new care-of-address)
  • mobility, changing foreign networks transparent
    ongoing connections can be maintained!

99
Reliable Transmission
100
rdt3.0 stop-and-wait operation
sender
receiver
first packet bit transmitted, t 0
last packet bit transmitted, t L / R
first packet bit arrives
RTT
last packet bit arrives, send ACK
ACK arrives, send next packet, t RTT L / R
101
Pipelined protocols
  • Pipelining sender allows multiple, in-flight,
    yet-to-be-acknowledged pkts
  • range of sequence numbers must be increased
  • buffering at sender and/or receiver
  • Two generic forms of pipelined protocols
    go-Back-N, selective repeat

102
Pipelining (by factor of 3)
sender
receiver
first packet bit transmitted, t 0
last bit transmitted, t L / R
first packet bit arrives
RTT
last packet bit arrives, send ACK
last bit of 2nd packet arrives, send ACK
last bit of 3rd packet arrives, send ACK
ACK arrives, send next packet, t RTT L / R
Increase utilization by a factor of 3!
103
Go-Back-N
  • Sender
  • k-bit seq in pkt header
  • window of up to N, consecutive unacked pkts
    allowed
  • ACK(n) ACKs all pkts up to, including seq n -
    cumulative ACK
  • may receive duplicate ACKs (see receiver)
  • timer for each in-flight pkt
  • timeout(n) retransmit pkt n and all higher seq
    pkts in window

104
Selective Repeat
  • receiver individually acknowledges all correctly
    received pkts
  • buffers pkts, as needed, for eventual in-order
    delivery to upper layer
  • sender only resends pkts for which ACK not
    received
  • sender timer for each unACKed pkt
  • sender window
  • N consecutive seq s
  • again limits seq s of sent, unACKed pkts

105
Selective repeat sender, receiver windows
106
Look at global negative acknowledgment scheme
  • Negative acknowledgment protocol along with token
    passing in distcomp.ppt.

107
Network Layer circuit switching vs. packet
switching
108
Switching Networks
  • Long distance transmission is typically done over
    a network of switched nodes
  • Nodes not concerned with content of data
  • End devices are stations
  • Computer, terminal, phone, etc.
  • A collection of nodes and connections is a
    communications network
  • Data routed by being switched from node to node

109
Technology
  • Two different switching technologies
  • Circuit switching
  • Packet switching

110
Simple Switched Network
111
Circuit Switching
  • Dedicated communication path between two stations
    (during conversation)
  • Three phases
  • Establish
  • Transfer
  • Disconnect
  • Must have switching capacity and channel capacity
    to establish connection
  • Must have intelligence to work out routing

112
Circuit Switching - Issues
  • Circuit switching is inefficient (designed for
    voice)
  • Resources dedicated to a particular call
  • Much of the time a data connection is idle
  • Data rate is fixed
  • Both ends must operate at the same rate
  • Set up (connection) takes time
  • Once connected, transfer is transparent

113
Packet Switching
114
Basic Operation
  • Data transmitted in small packets
  • Typically 1000 octets
  • Longer messages split into series of packets
  • Each packet contains a portion of user data plus
    some control info
  • Control info
  • Routing (addressing) info
  • Packets are received, stored briefly (buffered)
    and passed on to the next node
  • Store and forward

115
Use of Packets
116
Network layer
  • transport segment from sending to receiving host
  • on sending side encapsulates segments into
    datagrams
  • on rcving side, delivers segments to transport
    layer
  • network layer protocols in every host, router
  • Router examines header fields in all IP datagrams
    passing through it

117
Key Network-Layer Functions
  • analogy
  • routing process of planning trip from source to
    dest
  • forwarding process of getting through single
    interchange
  • forwarding move packets from routers input to
    appropriate router output
  • routing determine route taken by packets from
    source to dest.
  • Routing algorithms

118
Interplay between routing and forwarding
119
Many different interconnection topologies
  • Pointer to interconnection.ppt

120
Virtual circuit vs. datagram networks(Shasha
students read on your own)
121
Network layer connection and connection-less
service
  • Datagram network provides network-layer
    connectionless service
  • VC network provides network-layer connection
    service
  • Analogous to the transport-layer services, but
  • Service host-to-host
  • No choice network provides one or the other
  • Implementation in the core

122
Virtual circuits
  • source-to-dest path behaves much like telephone
    circuit
  • performance-wise
  • network actions along source-to-dest path
  • call setup, teardown for each call before data
    can flow
  • each packet carries VC identifier (not
    destination host address)
  • every router on source-dest path maintains
    state for each passing connection
  • link, router resources (bandwidth, buffers) may
    be allocated to VC

123
VC implementation
  • A VC consists of
  • Path from source to destination
  • VC numbers, one number for each link along path
  • Entries in forwarding tables in routers along
    path
  • Packet belonging to VC carries a VC number.
  • VC number must be changed on each link.
  • New VC number comes from forwarding table

124
Forwarding table
Forwarding table in northwest router
Routers maintain connection state information!
125
Virtual circuits signaling protocols
  • used to setup, maintain teardown VC
  • used in ATM, frame-relay, X.25
  • not used in todays Internet

6. Receive data
5. Data flow begins
4. Call connected
3. Accept call
1. Initiate call
2. incoming call
126
Datagram networks
  • no call setup at network layer
  • routers no state about end-to-end connections
  • no network-level concept of connection
  • packets forwarded using destination host address
  • packets between same source-dest pair may take
    different paths

1. Send data
2. Receive data
127
Datagram or VC network why?
  • Internet
  • data exchange among computers
  • elastic service, no strict timing req.
  • smart end systems (computers)
  • can adapt, perform control, error recovery
  • simple inside network, complexity at edge
  • many link types
  • different characteristics
  • uniform service difficult
  • ATM
  • evolved from telephony
  • human conversation
  • strict timing, reliability requirements
  • need for guaranteed service
  • dumb end systems
  • telephones
  • complexity inside network

128
The Internet Network layer
  • Host, router network layer functions

Transport layer TCP, UDP
Network layer
Link layer
physical layer
129
Routing
130
Routing Strategies
  • Fixed
  • Flooding
  • Random
  • Adaptive

131
Fixed Routing
  • Single permanent route for each source to
    destination pair
  • Determine routes using a least cost algorithm
  • Route fixed, at least until a change in network
    topology

132
Fixed RoutingTables
133
Flooding
  • No network info required
  • Packet sent by node to every neighbor
  • Incoming packets retransmitted on every link
    except incoming link
  • Eventually a number of copies will arrive at
    destination
  • Each packet is uniquely numbered so duplicates
    can be discarded
  • Nodes can remember packets already forwarded to
    keep network load in bounds
  • Can include a hop count in packets

134
Flooding Example
135
Properties of Flooding
  • All possible routes are tried
  • Very robust
  • At least one packet will have taken minimum hop
    count route
  • Can be used to set up virtual circuit
  • All nodes are visited
  • Useful to distribute information (e.g. routing)

136
Random Routing
  • Node selects one outgoing path for retransmission
    of incoming packet
  • Selection can be random or round robin
  • Can select outgoing path based on probability
    calculation
  • No network info needed
  • Route is typically not least cost nor minimum hop

137
Adaptive Routing
  • Used by almost all packet switching networks
  • Routing decisions change as conditions on the
    network change
  • Failure
  • Congestion
  • Requires info about network
  • Decisions more complex
  • Tradeoff between quality of network info and
    overhead
  • Reacting too quickly can cause oscillation
    (bathtub)
  • Reacting too slowly can create irrelevance

138
Routing Algorithm classification
  • Static or dynamic?
  • Static
  • routes change slowly over time
  • Dynamic
  • routes change more quickly
  • periodic update
  • in response to link cost changes
  • Global or decentralized information?
  • Global
  • all routers have complete topology, link cost
    info
  • link state algorithms
  • Decentralized
  • router knows physically-connected neighbors, link
    costs to neighbors
  • iterative process of computation, exchange of
    info with neighbors
  • distance vector algorithms

139
A Link-State Routing Algorithm
  • Dijkstras algorithm
  • net topology, link costs known to all nodes
  • accomplished via link state broadcast
  • all nodes have same info
  • computes least cost paths from one node
    (source) to all other nodes
  • gives forwarding table for that node
  • iterative after k iterations, know least cost
    path to k dest.s
  • Notation
  • c(x,y) link cost from node x to y 8 if not
    direct neighbors
  • D(v) current value of cost of path from source
    to dest. v
  • p(v) predecessor node along path from source to
    v
  • N' set of nodes whose least cost path
    definitively known

140
Dijsktras Algorithm
1 Initialization 2 N' u 3 for all
nodes v 4 if v adjacent to u 5
then D(v) c(u,v) 6 else D(v) 8 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(w,v) ) 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'
141
Distance vector algorithm
  • Basic idea
  • Each node periodically sends its own distance
    vector estimate to neighbors
  • When node a node x receives new DV estimate from
    neighbor, it updates its own DV using B-F
    equation

Dx(y) ? minvc(x,v) Dv(y) for each node y ?
N
  • Under minor, natural conditions, the estimate
    Dx(y) converge the actual least cost dx(y)

142
Distance Vector Algorithm Properties
Each node
  • Iterative, asynchronous each local iteration
    caused by
  • local link cost change
  • DV update message from neighbor
  • Distributed
  • each node notifies neighbors only when its DV
    changes
  • neighbors then notify their neighbors if necessary

143
Hierarchical OSPF
144
Hierarchical OSPF
  • Two-level hierarchy local area, backbone.
  • Link-state advertisements only in area
  • each nodes has detailed area topology only know
    direction (shortest path) to nets in other areas.
  • Area border routers summarize distances to
    nets in own area, advertise to other Area Border
    routers.
  • Backbone routers run OSPF routing limited to
    backbone.
  • Boundary routers connect to other ASs.

145
Internet inter-AS routing BGP
  • BGP (Border Gateway Protocol) the de facto
    standard
  • BGP provides each AS a means to
  • Obtain subnet reachability information from
    neighboring ASs.
  • Propagate the reachability information to all
    routers internal to the AS.
  • Determine good routes to subnets based on
    reachability information and policy.
  • Allows a subnet to advertise its existence to
    rest of the Internet I am here

146
Why different Intra- and Inter-AS routing ?
  • Policy
  • Inter-AS admin wants control over how its
    traffic routed, who routes through its net.
  • Intra-AS single admin, so no policy decisions
    needed
  • Scale
  • hierarchical routing saves table size, reduced
    update traffic
  • Performance
  • Intra-AS can focus on performance
  • Inter-AS policy may dominate over performance
Write a Comment
User Comments (0)
About PowerShow.com