Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network...

560
1 Introduction Introduction n Basic concepts Basic concepts n Terminology Terminology This watermark does not appear in the registered version - http://www.clicktoconvert.com

Transcript of Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network...

Page 1: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

1

IntroductionIntroduction

nn Basic conceptsBasic concepts

nn TerminologyTerminology

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 2: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

2

Ubiquitous ComputingUbiquitous Computing

nn Computers everywhere.Computers everywhere.

nn Also means ubiquitous communicationAlso means ubiquitous communication

–– Users connected anywhere/anytime.Users connected anywhere/anytime.

–– PC (laptop, palmtop) equivalent to cell phone.PC (laptop, palmtop) equivalent to cell phone.

nn Networking computers together is critical!Networking computers together is critical!

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 3: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

3

Computer NetworkComputer Network

nn Provide access to local and remote resources.Provide access to local and remote resources.

nn Collection of interconnected end systems: Collection of interconnected end systems:

–– Computing devices (mainframes, workstations, Computing devices (mainframes, workstations, PCs, palm tops)PCs, palm tops)

–– Peripherals (printers, scanners, terminals).Peripherals (printers, scanners, terminals).

nn Applications: location transparency.Applications: location transparency.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 4: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

4

Computer Networks (cont’d)Computer Networks (cont’d)

nn Components: Components:

–– End systems (or hosts),End systems (or hosts),

–– Routers/switches/bridges, and Routers/switches/bridges, and

–– Links (twisted pair, coaxial cable, fiber, radio, Links (twisted pair, coaxial cable, fiber, radio, etc.).etc.).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 5: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

5

Communication ModelCommunication Model

Network

Source Destination

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 6: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

6

ExampleExample

PTN

Source DestinationModem Modem

Source System Destination System

PTN: Public Telephone Network

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 7: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

7

Connecting End SystemsConnecting End Systems

Dedicated link

Multiple access / shared medium

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 8: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

8

Connecting End Systems (cont’d)Connecting End Systems (cont’d)

Router

Switched network

Router: switching element; a.k.a., IMPs (InterfaceMessage Processors) in ARPAnet’s terminology.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 9: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

9

Shared Communication Shared Communication InfrastructureInfrastructure

nn Shared medium:Shared medium:

–– Examples: Examples: ethernetethernet, radio., radio.

–– How to acquire channel: medium access control How to acquire channel: medium access control protocols.protocols.

nn Switched networks:Switched networks:

–– Shared infrastructure consisting of pointShared infrastructure consisting of point--toto--point links.point links.

–– CircuitCircuit-- versus packetversus packet--switching.switching.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 10: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

10

Circuit SwitchingCircuit Switching

nn Establish dedicated path (circuit) between source and Establish dedicated path (circuit) between source and destination.destination.

nn Example: telephone network.Example: telephone network.

nn +’s: dedicated resources(stream+’s: dedicated resources(stream--oriented).oriented).

nn --’s: lower resource utilization (e.g.,bursts).’s: lower resource utilization (e.g.,bursts).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 11: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

11

Packet SwitchingPacket Switching

nn Data split into transmission units, or Data split into transmission units, or packets.packets.

nn Routers: store packets briefly store packets and forward Routers: store packets briefly store packets and forward them: storethem: store--andand--forward.forward.

nn Efficient resource use: statistical multiplexing.Efficient resource use: statistical multiplexing.

nn Ability to accommodate bursts.Ability to accommodate bursts.

S1

D1

S2

D2

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 12: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

12

(Switched) Network Topologies(Switched) Network Topologies

StarRing Tree

Irregular

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 13: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

13

ProtocolProtocol

nn Set of rules that allow peering entities to Set of rules that allow peering entities to communicate.communicate.

––

Example: 2 friends talking on the phone.

Example: 2 friends talking on the phone.

–– Peering entities or peers: user application Peering entities or peers: user application programs, file transfer services, eprograms, file transfer services, e--mail services, mail services, etc.etc.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 14: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

14

Network ArchitectureNetwork Architecture

nn Protocol layers: reduce design complexity.Protocol layers: reduce design complexity.

nn Main idea: each layer uses the services from Main idea: each layer uses the services from lower layer and provide services to upper lower layer and provide services to upper layer.layer.

–– Higher layer shielded from the implementation Higher layer shielded from the implementation details of lower layers.details of lower layers.

–– Interface between layers must be clearly Interface between layers must be clearly defined: services provided to upper layer.defined: services provided to upper layer.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 15: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

15

Example 1: ISO OSI Model

Example 1: ISO OSI Model

nn ISO: International Standards OrganizationISO: International Standards Organization

nn OSI: Open Systems Interconnection.OSI: Open Systems Interconnection.

Physical

Data link

Network

Transport

Session

Presentation

Application

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 16: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

16

OSI ISO 7

OSI ISO 7--Layer ModelLayer Model

nn Physical layer: transmission of bits.Physical layer: transmission of bits.

nn Data link layer: reliable transmission over Data link layer: reliable transmission over physical medium; synchronization, error physical medium; synchronization, error control, flow control; media access in control, flow control; media access in shared medium.shared medium.

nn Network layer: routing and forwarding; Network layer: routing and forwarding; congestion control; internetworking.congestion control; internetworking.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 17: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

17

OSI ISO 7

OSI ISO 7--Layer Model (cont’d)Layer Model (cont’d)

nn Transport layer: error, flow, and congestion Transport layer: error, flow, and congestion control endcontrol end--toto--end. end.

nn Session layer: manages connections Session layer: manages connections (sessions) between end points.(sessions) between end points.

nn Presentation layer: data representation.Presentation layer: data representation.

nn Application layer: provides users with Application layer: provides users with access to the underlying communication access to the underlying communication infrastructure.infrastructure.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 18: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

18

Example 2: TCP/IP Model

Example 2: TCP/IP Model

nn Model employed by the Internet.Model employed by the Internet.

Physical

Data link

Network

Transport

Session

Presentation

ApplicationApplication

Transport

Internet

NetworkAccess

Physical

TCP/IP ISO OSI

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 19: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

19

TCP/IP Protocol Suite:TCP/IP Protocol Suite:

nn Physical layer: same as OSI ISO model.Physical layer: same as OSI ISO model.

nn Network access layer: medium access and Network access layer: medium access and routing over single network.routing over single network.

nn Internet layer: routing across multiple Internet layer: routing across multiple networks, or, an internet.networks, or, an internet.

nn Transport layer: endTransport layer: end--toto--end error, end error, congestion, flow control functions.congestion, flow control functions.

nn Application layer: same as OSI ISO model.Application layer: same as OSI ISO model.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 20: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

20

The Internet: Some HistoryThe Internet: Some History

nn

Late 1970’s/ early 1980’s: the ARPANET (funded by

Late 1970’s/ early 1980’s: the ARPANET (funded by ARPA).ARPA).–– Connecting university, research labs and some government Connecting university, research labs and some government

agencies.agencies.

–– Main applications: eMain applications: e--mail and file transfer.mail and file transfer.

nn Features:Features:–– Decentralized, nonDecentralized, non--regulated system.regulated system.

–– No centralized authority.No centralized authority.

–– No structure.No structure.

–– Network of networks.Network of networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 21: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

21

The Internet (cont’d)The Internet (cont’d)

nn

Early 1990’s, the Web caused the Internet

Early 1990’s, the Web caused the Internet revolution: the Internet’s killer app!revolution: the Internet’s killer app!

nn Today:Today:

––

Almost 60 million hosts as of 01.99.

Almost 60 million hosts as of 01.99.

–– Doubles every year.Doubles every year.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 22: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

22

Topics for Further ReadingTopics for Further Reading

nn Some Internet governing entities:Some Internet governing entities:

–– IABIAB

–– IETFIETF

–– IRTFIRTF

nn The Internet’s standardization process.The Internet’s standardization process.

nn Other network standardization bodies.Other network standardization bodies.

nn Other networks (Bitnet, SNA, etc).Other networks (Bitnet, SNA, etc).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 23: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

23

Physical Layer Physical Layer

nn Sending raw bits across “the wire”.Sending raw bits across “the wire”.

nn Issues:Issues:

–– What’s being transmitted.What’s being transmitted.

–– Transmission medium.Transmission medium.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 24: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

24

Basic ConceptsBasic Concepts

nn Signal: electroSignal: electro--magnetic wave carrying magnetic wave carrying information.information.

nn Time domain: signal as a function of time.Time domain: signal as a function of time.

–– Analog signal: signal’s amplitude varies Analog signal: signal’s amplitude varies continuously over time, continuously over time, ieie, no discontinuities., no discontinuities.

–– Digital signal: data represented by sequence of Digital signal: data represented by sequence of

0’s and 1’s (e.g., square wave).

0’s and 1’s (e.g., square wave).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 25: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

25

Time DomainTime Domain

nn Periodic signals:Periodic signals:–– Same signal pattern repeats over time.Same signal pattern repeats over time.

–– Example: sine waveExample: sine wave»» Amplitude (A)Amplitude (A)

»»

Period (or frequency) (T = 1/f)

Period (or frequency) (T = 1/f)

»» PhasePhase(f)(f)

)()(

)2sin()(

tsTts

ftAts

=+

+P= f

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 26: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

26

Frequency DomainFrequency Domain

nn Signal consists of components of different Signal consists of components of different frequencies.frequencies.

nn Spectrum of signal: range of frequencies Spectrum of signal: range of frequencies signal contains.signal contains.

nn Absolute bandwidth: width of signal’s Absolute bandwidth: width of signal’s spectrum. spectrum.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 27: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

27

Example:Example:

))3(2sin(3/1)2sin()( 11 tftfts P+P=

nn Spectrum of Spectrum of S(f) S(f) extends from fextends from f11

to 3f

to 3f11..

nn

Bandwidth is 2f

Bandwidth is 2f

1.

1.

S(f)

f1 2 3

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 28: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

28

Bandwidth and Data RateBandwidth and Data Rate

nn Data rate: rate at which data is transmitted; Data rate: rate at which data is transmitted; unit is bits/sec or bps (applies to digital unit is bits/sec or bps (applies to digital signal).signal).––

Example: 2Mbits/sec, or 2Mbps.

Example: 2Mbits/sec, or 2Mbps.

nn Digital signal has infinite frequency Digital signal has infinite frequency components, thus infinite bandwidth.components, thus infinite bandwidth.

nn If data rate of signal is If data rate of signal is WW bps, good bps, good representation achieved with representation achieved with

2W

2W Hz Hz bandwidth. bandwidth.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 29: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

29

Baud versus Data RateBaud versus Data Rate

nn Baud rate: number of times per second Baud rate: number of times per second signal changes its value (voltage).signal changes its value (voltage).

nn

Each value might “carry” more than 1 bit.

Each value might “carry” more than 1 bit.

––

Example: 8 values of voltage (0..7); each value

Example: 8 values of voltage (0..7); each value

conveys 3 bits,

conveys 3 bits, ieie, number of bits = log, number of bits = log22V.V.

nn Thus, bit rate = logThus, bit rate = log22V * baud rate.V * baud rate.

nn

For 2 levels, bit rate = baud rate.

For 2 levels, bit rate = baud rate.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 30: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

30

Data Transmission 1

Data Transmission 1

nn Analog and digital transmission.Analog and digital transmission.–– Example of analog data: voice and video.Example of analog data: voice and video.

–– Example of digital data: character stringsExample of digital data: character strings»» Use of codes to represent characters as sequence of bits Use of codes to represent characters as sequence of bits

(e.g., ASCII).(e.g., ASCII).

nn Historically, communication infrastructure for Historically, communication infrastructure for analog transmission.analog transmission.–– Digital data needed to be converted: modems Digital data needed to be converted: modems

(modulator(modulator--demodulator).demodulator).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 31: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

31

Digital TransmissionDigital Transmission

nn Current trend: digital transmission.Current trend: digital transmission.–– Cost efficient: advances in digital circuitry Cost efficient: advances in digital circuitry

(VLSI).(VLSI).

nn Advantages:Advantages:–– Data integrity: better noise immunity.Data integrity: better noise immunity.

–– Security: easier to integrate encryption Security: easier to integrate encryption algorithms.algorithms.

–– Channel utilization: higher degree of Channel utilization: higher degree of multiplexing (timemultiplexing (time--division division mux’ingmux’ing).).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 32: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

32

Transmission ImpairmentsTransmission Impairments

nn Cause received signal to differ from Cause received signal to differ from original, transmitted signal.original, transmitted signal.

–– Analog data: quality degradationAnalog data: quality degradation

–– Digital data: bit errors.Digital data: bit errors.

nn Types of impairments:Types of impairments:

–– Attenuation.Attenuation.

–– Delay distortion.Delay distortion.

–– Noise.Noise.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 33: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

33

Attenuation 1

Attenuation 1

nn Weakening of the signal’s power as it Weakening of the signal’s power as it propagates through medium.propagates through medium.

nn Function of medium typeFunction of medium type

–– Guided medium: logarithmic with distance. Guided medium: logarithmic with distance.

–– Unguided medium: more complex (function of Unguided medium: more complex (function of distance and atmospheric conditions).distance and atmospheric conditions).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 34: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

34

Attenuation 2

Attenuation 2

nn Problems and solutions:Problems and solutions:

–– Insufficient signal strength for receiver to Insufficient signal strength for receiver to interpret it: use amplifiers/repeaters to interpret it: use amplifiers/repeaters to boost/regenerate signal.boost/regenerate signal.

–– Error due to noise interference (level is not high Error due to noise interference (level is not high enough to be distinguished from noise): use enough to be distinguished from noise): use amplifiers/repeaters.amplifiers/repeaters.

–– Attenuation increases with frequency: special Attenuation increases with frequency: special amplifiers to amplify highamplifiers to amplify high--frequencies.frequencies.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 35: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

35

Delay DistortionDelay Distortion

nn Speed of propagation in guided media Speed of propagation in guided media varies with frequency.varies with frequency.

–– Different frequency components arrive at Different frequency components arrive at receiver at different times.receiver at different times.

nn Solution: equalization techniques to Solution: equalization techniques to equalize distortion for different frequencies.equalize distortion for different frequencies.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 36: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

36

NoiseNoise

nn Noise: undesired signals inserted anywhere Noise: undesired signals inserted anywhere in the source/destination path.in the source/destination path.

nn Different categories: thermal (white), Different categories: thermal (white), crosstalk, impulse, etc.crosstalk, impulse, etc.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 37: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

37

Decibel and SignalDecibel and Signal--toto--Noise Noise RatioRatio

nn Decibel (dB): measures relative strength of Decibel (dB): measures relative strength of

2 signals.

2 signals.

–– Example: SExample: S11 and Sand S22 with powers Pwith powers P11 and Pand P22..

NNdBdB

= 10 log

= 10 log1010 (P(P11/P/P22))

nn SignalSignal--toto--noise ratio (S/N):noise ratio (S/N):

–– Measures signal quality.Measures signal quality.

–– S/S/NNdBdB

= 10 log

= 10 log

10

10 (signal power/noise power)(signal power/noise power)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 38: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

38

Channel Capacity 1

Channel Capacity 1

nn Rate at which data can be transmitted over Rate at which data can be transmitted over communication channel.communication channel.

nn NoiseNoise--free channel: free channel: NyquistNyquist TheoremTheorem

–– Limitation of data rate is signal’s bandwidth.Limitation of data rate is signal’s bandwidth.

–– Given channel bandwidth Given channel bandwidth WW, highest signal rate , highest signal rate (or baud rate) is (or baud rate) is

2W

2W..

–– From receiver’s point of view: sampling at rate From receiver’s point of view: sampling at rate

2W

2W can reconstruct signal.can reconstruct signal.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 39: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

39

Channel Capacity 2

Channel Capacity 2

nn Using data rate,Using data rate,––

C = 2W log

C = 2W log22V, where V is number voltage levels.V, where V is number voltage levels.

nn Same bandwidth, increasing number of signal Same bandwidth, increasing number of signal levels, increases data rate, but more complex levels, increases data rate, but more complex signal recognition at receiver and more noisesignal recognition at receiver and more noise--prone.prone.

nn This is a theoretical upper bound, since This is a theoretical upper bound, since channels are noisy.channels are noisy.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 40: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

40

Channel Capacity 3

Channel Capacity 3

nn Noisy channel: Shannon’s TheoremNoisy channel: Shannon’s Theorem

–– Given channel with Given channel with WW (Hz) bandwidth and (Hz) bandwidth and S/NS/N(dB) signal(dB) signal--toto--noise ratio, C (bps) isnoise ratio, C (bps) is

»» C = W logC = W log22

(1+S/N)

(1+S/N)

–– Theoretical upper bound since assumes only Theoretical upper bound since assumes only thermal noise (no impulse noise, etc).thermal noise (no impulse noise, etc).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 41: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

41

Transmission MediaTransmission Media

nn Physically connect transmitter and receiver Physically connect transmitter and receiver carrying signals in the form electromagnetic carrying signals in the form electromagnetic waves.waves.

nn Types of media:Types of media:

–– Guided: waves guided along solid medium such as Guided: waves guided along solid medium such as copper twisted pair, coaxial cable, optical fiber.copper twisted pair, coaxial cable, optical fiber.

–– Unguided: “wireless” transmission (atmosphere, Unguided: “wireless” transmission (atmosphere, outer space).outer space).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 42: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

42

Guided Media: Examples 1

Guided Media: Examples 1

nn Twisted Pair:Twisted Pair:––

2 insulated copper wires arranged in regular spiral.

2 insulated copper wires arranged in regular spiral. Typically, several of these pairs are bundled into a Typically, several of these pairs are bundled into a cable.cable.

–– Cheapest and most widely used; limited in Cheapest and most widely used; limited in distance, bandwidth, and data rate.distance, bandwidth, and data rate.

–– Applications: telephone system (homeApplications: telephone system (home--local local exchange connection).exchange connection).

–– Unshielded and shielded twisted pair.Unshielded and shielded twisted pair.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 43: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

43

Examples 2

Examples 2

nn Coaxial CableCoaxial Cable–– Hollow outer cylinder conductor surrounding Hollow outer cylinder conductor surrounding

inner wire conductor; dielectric (noninner wire conductor; dielectric (non--conducting) conducting) material in the middle.material in the middle.

–– Applications: cable TV, longApplications: cable TV, long--distance telephone distance telephone system, LANs.system, LANs.

–– +’s: Higher data rates and frequencies, better +’s: Higher data rates and frequencies, better interference and crosstalk immunity.interference and crosstalk immunity.

–– --’s: Attenuation and thermal noise.’s: Attenuation and thermal noise.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 44: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

44

Examples 3

Examples 3

nn Optical FiberOptical Fiber

–– Thin, flexible cable that conducts optical Thin, flexible cable that conducts optical waves.waves.

–– Applications: longApplications: long--distance distance telecommunications, LANs.telecommunications, LANs.

–– +’s: greater capacity, smaller and lighter, lower +’s: greater capacity, smaller and lighter, lower attenuation, better isolation, attenuation, better isolation,

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 45: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

45

Unguided, Wireless MediaUnguided, Wireless Media

nn Microwave: directional, LOS transmission.Microwave: directional, LOS transmission.

nn Satellite: directional, LOS, large delay, high Satellite: directional, LOS, large delay, high bandwidth.bandwidth.

nn Radio: Radio: omnidirectionalomnidirectional (broadcast), single hop (broadcast), single hop (cellular), multi(cellular), multi--hop (ad hoc net’s).hop (ad hoc net’s).

nn Infrared: directional, LOS transmission, Infrared: directional, LOS transmission, cannot penetrate obstacles and used outdoors.cannot penetrate obstacles and used outdoors.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 46: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

Chapter 4 EE/CS 450 Fall 99 46

Data EncodingData Encoding

nn Transforming original signal just before Transforming original signal just before transmission.transmission.

nn Both analog and digital data can be encoded Both analog and digital data can be encoded into either analog or digital signals.into either analog or digital signals.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 47: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

47

Digital/Analog EncodingDigital/Analog Encoding

Source Destination

Encoder Decoder

Source System Destination System

g(t) g(t)

(D/A)

Source Destination

Modulator Demodulator

Source System Destination System

g(t) g(t)

(D/A)

Digital Medium

Analog Medium

Encoding:

Modulation:

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 48: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

48

Encoding ConsiderationsEncoding Considerations

nn Digital signaling can use modern digital Digital signaling can use modern digital transmission infrastructure.transmission infrastructure.

nn Some media like fiber and unguided media Some media like fiber and unguided media only carry analog signals.only carry analog signals.

nn AnalogAnalog--toto--analog conversion used to shift analog conversion used to shift signal to use another portion of spectrum for signal to use another portion of spectrum for better channel utilization (frequency better channel utilization (frequency division division mux’ingmux’ing).).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 49: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

49

Digital Transmission Digital Transmission TerminologyTerminology

nn Data element: bit.Data element: bit.

nn Signaling element: encoding of data Signaling element: encoding of data element for transmission.element for transmission.

nn UnipolarUnipolar signaling: signaling elements have signaling: signaling elements have same polarization (all + or all same polarization (all + or all --).).

nn Polar signaling: different polarization for Polar signaling: different polarization for different elements.different elements.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 50: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

50

More TerminologyMore Terminology

nn Data rate: rate in bps at which data is Data rate: rate in bps at which data is transmitted; for data rate of R, bit duration transmitted; for data rate of R, bit duration

(time to emit 1 bit) is 1/R sec.

(time to emit 1 bit) is 1/R sec.

nn Modulation rate = baud rate (rate at which Modulation rate = baud rate (rate at which signal levels change).signal levels change).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 51: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

51

Digital Transmission: ReceiverDigital Transmission: Receiver--Side IssuesSide Issues

nn Clocking: determining the beginning and Clocking: determining the beginning and end of each bit.end of each bit.

––

Transmitting long sequences of 0’s or 1’s can

Transmitting long sequences of 0’s or 1’s can cause synchronization problems.cause synchronization problems.

nn Signal level: determining whether the signal Signal level: determining whether the signal

represents the high (logic 1) or low (logic 0)

represents the high (logic 1) or low (logic 0) levels.levels.

–– S/N ratio is a factor.S/N ratio is a factor.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 52: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

52

Comparing Digital Encoding Comparing Digital Encoding TechniquesTechniques

nn Signal spectrum: high frequency means Signal spectrum: high frequency means high bandwidth required for transmission.high bandwidth required for transmission.

nn Clocking: transmitted signal should be selfClocking: transmitted signal should be self--clocking.clocking.

nn Error detection: built in the encoding Error detection: built in the encoding scheme.scheme.

nn Noise immunity: low bit error rate.Noise immunity: low bit error rate.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 53: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

53

DigitalDigital--toto--Digital Encoding Digital Encoding TechniquesTechniques

nn NonreturnNonreturn to Zero (NRZ)to Zero (NRZ)

nn Multilevel BinaryMultilevel Binary

nn BiphaseBiphase

nn ScramblingScrambling

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 54: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

54

NRZ TechniquesNRZ Techniques

nn

Use of 2 different voltage levels.

Use of 2 different voltage levels.

nn NRZNRZ--L: positive voltage represents one binary L: positive voltage represents one binary value; negative voltage, the other.value; negative voltage, the other.

nn NRZI (NRZI (NonreturnNonreturn to zero, invert on ones): to zero, invert on ones): transition (lowtransition (low--toto--high or highhigh or high--toto--low) low)

represents “1”; no transition, “0”.

represents “1”; no transition, “0”.

nn NRZI is an example of differential encoding: NRZI is an example of differential encoding: decoding based on comparing polarity of decoding based on comparing polarity of adjacent signal elements. adjacent signal elements.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 55: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

55

Multilevel BinaryMultilevel Binary

nn

Use more than 2 signal levels.

Use more than 2 signal levels.

nn BipolarBipolar--

AMI: “0”: no signal; “1”: positive and

AMI: “0”: no signal; “1”: positive and

negative pulse; consecutive “1”s alternate in

negative pulse; consecutive “1”s alternate in polarity: avoid synchronization loss.polarity: avoid synchronization loss.

nn PseudoternaryPseudoternary: opposite representation.: opposite representation.

nn

Long sequence of 0’s or 1’s still a problem for

Long sequence of 0’s or 1’s still a problem for bipolarbipolar--AMI and AMI and pseudoternarypseudoternary respectively.respectively.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 56: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

56

BiphaseBiphase

nn Manchester: transition in the middle of bit period.Manchester: transition in the middle of bit period.

–– Carries data and provides clocking.Carries data and provides clocking.

–– LowLow--toto--

high: “1”.

high: “1”.

–– HighHigh--toto--

low: “0”.

low: “0”.

nn Differential Manchester:Differential Manchester:

–– MidMid--bit transition only provides clocking.bit transition only provides clocking.

––

“0”: transition in the beginning of bit interval.

“0”: transition in the beginning of bit interval.

––

“1”: no transition.

“1”: no transition.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 57: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

57

ScramblingScrambling

nn

Avoid long sequences of 0’s or 1’s.

Avoid long sequences of 0’s or 1’s.

nn

Bipolar with 8

Bipolar with 8--

zeros substitution (B8ZS)

zeros substitution (B8ZS)

––

Inserts transitions when transmitting 8 consecutive “0”s.

Inserts transitions when transmitting 8 consecutive “0”s.

nn HighHigh--density bipolardensity bipolar--

3 zeros (HDB3)

3 zeros (HDB3)

––

Inserts pulses when transmitting 4 consecutive “0”s.

Inserts pulses when transmitting 4 consecutive “0”s.

nn Receiver must recognize insertions and reReceiver must recognize insertions and re--generate generate original signal.original signal.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 58: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

58

DigitalDigital--toto--Analog EncodingAnalog Encoding

nn Transmission of digital data using analog Transmission of digital data using analog signaling.signaling.

nn Example: data transmission of a PTN.Example: data transmission of a PTN.

nn

PTN: voice signals ranging from 300Hz to

PTN: voice signals ranging from 300Hz to

3400 Hz.

3400 Hz.

nn Modems: convert digital data to analog Modems: convert digital data to analog signals and back.signals and back.

nn Techniques: ASK, FSK, and PSK.Techniques: ASK, FSK, and PSK.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 59: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

59

AmplitudeAmplitude--Shift KeyingShift Keying

nn

2 binary values represented by 2

2 binary values represented by 2 amplitudes.amplitudes.

nn

Typically, “0” represented by absence of

Typically, “0” represented by absence of

carrier and “1” by presence of carrier.

carrier and “1” by presence of carrier.

nn Prone to errors caused by amplitude Prone to errors caused by amplitude changes.changes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 60: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

60

FrequencyFrequency--Shift KeyingShift Keying

nn

2 binary values represented by 2

2 binary values represented by 2 frequencies.frequencies.

nn Frequencies Frequencies ff11 and and ff

2

2 are offset fromare offset from carrier carrier frequency by same amount in opposite frequency by same amount in opposite directionsdirections..

nn Less error prone than ASK.Less error prone than ASK.

"0"),2cos()(

"1"),2cos()(

2

1

tfAts

tfAts

P=

P=

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 61: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

61

PhasePhase--Shift KeyingShift Keying

nn Phase of carrier is shifted to represent data.Phase of carrier is shifted to represent data.

nn

Example: 2

Example: 2--phase system.phase system.

nn

Phase shift of 90

Phase shift of 90oo can represent more bits: can represent more bits: akaaka, , quadraturequadrature PSK.PSK.

"0"),2cos()(

"1"),2cos()(

tfAts

tfAts

c

c

P=

P+P=

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 62: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

62

AnalogAnalog--toto--Digital EncodingDigital Encoding

nn Analog data transmitted as digital signal, or Analog data transmitted as digital signal, or digitization.digitization.

nn Codec: device used to encode and decode Codec: device used to encode and decode analog data into digital signal, and back.analog data into digital signal, and back.

nn

2 main techniques:

2 main techniques:

–– Pulse code modulation (PCM).Pulse code modulation (PCM).

–– Delta modulation (DM).Delta modulation (DM).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 63: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

63

Pulse Code Modulation 1

Pulse Code Modulation 1

nn Based on Based on NyquistNyquist (or sampling) theorem: if (or sampling) theorem: if

f(t) sampled at rate > 2*signal’s highest

f(t) sampled at rate > 2*signal’s highest frequency, then samples contain all the frequency, then samples contain all the original signal’s information.original signal’s information.

nn

Example: if voice data is limited to 4000Hz,

Example: if voice data is limited to 4000Hz,

8000 samples/sec are sufficient to

8000 samples/sec are sufficient to reconstruct original signal.reconstruct original signal.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 64: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

64

PCM 2

PCM 2

nn Analog signal Analog signal --> PAM > PAM --> PCM.> PCM.

–– PAM: pulse amplitude modulation; samples of PAM: pulse amplitude modulation; samples of original analog signal.original analog signal.

–– PCM: quantization of PAM pulses; amplitude PCM: quantization of PAM pulses; amplitude of PAM pulses approximated by of PAM pulses approximated by nn--bit integer; bit integer; each pulse carries each pulse carries nn bits. bits.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 65: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

65

Delta Modulation (DM)Delta Modulation (DM)

nn Analog signal approximated by staircase Analog signal approximated by staircase

function moving up or down by 1

function moving up or down by 1 quantization level every sampling interval.quantization level every sampling interval.

nn Bit stream produced based on derivative of Bit stream produced based on derivative of

analog signal (and not its amplitude): “1” if

analog signal (and not its amplitude): “1” if

staircase goes up, “0” otherwise.

staircase goes up, “0” otherwise.

nn Parameters: sampling rate and step size.Parameters: sampling rate and step size.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 66: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

66

AnalogAnalog--toto--Analog EncodingAnalog Encoding

nn Combines input signal Combines input signal m(t)m(t) and carrier at and carrier at ffcc

producing producing s(t)s(t) centered at centered at ffcc..

nn Why modulate analog data?Why modulate analog data?

–– Shift signal’s frequency for effective transmission.Shift signal’s frequency for effective transmission.

–– Allows channel multiplexing: frequencyAllows channel multiplexing: frequency--division division multiplexing.multiplexing.

nn Modulation techniques: AM, FM, and PM.Modulation techniques: AM, FM, and PM.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 67: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

67

Amplitude Modulation (AM)Amplitude Modulation (AM)

nn Carrier serves as envelope to signal being Carrier serves as envelope to signal being modulated.modulated.

nn Signal m(t) is being modulated by carrier Signal m(t) is being modulated by carrier

cos(2

cos(2pp ffcctt).).

nn Modulation index: ratio between amplitude Modulation index: ratio between amplitude of input signal to carrier.of input signal to carrier.

)2cos()](1[)( tftmtS cAM P+=

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 68: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

68

Angle ModulationAngle Modulation

nn FM and PM are special cases of angle FM and PM are special cases of angle modulation.modulation.

nn FM: carrier’s amplitude kept constant while FM: carrier’s amplitude kept constant while its frequency is varied according to message its frequency is varied according to message signal.signal.

nn PM: carrier’s phase varies linearly with PM: carrier’s phase varies linearly with modulating signal m(t).modulating signal m(t).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 69: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

69

Spread Spectrum 1

Spread Spectrum 1

nn Used to transmit analog or digital data using Used to transmit analog or digital data using analog signaling.analog signaling.

nn Spread information signal over wider Spread information signal over wider spectrum to make jamming and spectrum to make jamming and eavesdropping more difficult.eavesdropping more difficult.

nn Popular in wireless communicationsPopular in wireless communications

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 70: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

70

Spread Spectrum 2

Spread Spectrum 2

nn

2 schemes:

2 schemes:

–– Frequency hopping: signal broadcast over Frequency hopping: signal broadcast over random sequence of frequencies, hoping from random sequence of frequencies, hoping from one frequency to the next rapidly; receiver must one frequency to the next rapidly; receiver must do the same.do the same.

–– Direct Sequence: each bit in original signal Direct Sequence: each bit in original signal represented by series of bits in the transmitted represented by series of bits in the transmitted signal.signal.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 71: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

Chapter 5 EE/CS 450 Fall 99 71

Transmission ModesTransmission Modes

nn Assuming serial transmission, Assuming serial transmission, ieie, one , one signaling element sent at a time.signaling element sent at a time.

nn

Also assuming that 1 signaling element

Also assuming that 1 signaling element

represents 1 bit.

represents 1 bit.

nn Source and receiver must be in sync.Source and receiver must be in sync.

nn

2 schemes:

2 schemes:–– asynchronous andasynchronous and

–– synchronous transmission.synchronous transmission.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 72: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

72

Asynchronous Asynchronous XmissionXmission 11

nn Avoid synchronization problem by Avoid synchronization problem by including sync information explicitly.including sync information explicitly.

nn Character consists of a fixed number of bits, Character consists of a fixed number of bits, depending on the code used.depending on the code used.

nn Synchronization happens for every Synchronization happens for every

character: start (“0”) and stop (“1”) bits.

character: start (“0”) and stop (“1”) bits.

nn

Line is idle: transmits “1”.

Line is idle: transmits “1”.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 73: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

73

Asynchronous Asynchronous XmissionXmission 22

nn Example: sending “ABC” in ASCIIExample: sending “ABC” in ASCII

0 10000010 1 0 01000010 1 0 110000 1 1111…

0 10000010 1 0 01000010 1 0 110000 1 1111…

nn Timing requirements are not strict.Timing requirements are not strict.

nn But problems may occur.But problems may occur.

–– Significant clock drifts + high data rate = Significant clock drifts + high data rate = reception errors.reception errors.

nn

Also, 2 or more bits for synchronization:

Also, 2 or more bits for synchronization: overhead!overhead!

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 74: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

74

Synchronous Synchronous XmissionXmission 11

nn No start or stop bits.No start or stop bits.

nn Synchronization via:Synchronization via:

–– Separate clock signal provided by transmitter or Separate clock signal provided by transmitter or receiver; doesn’t work well over long distances.receiver; doesn’t work well over long distances.

–– Embed clocking information in data signal Embed clocking information in data signal using appropriate encoding technique such as using appropriate encoding technique such as Manchester or Differential Manchester.Manchester or Differential Manchester.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 75: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

75

Synchronous Synchronous XmissionXmission 22

nn Need to identify start/end of data block.Need to identify start/end of data block.

nn

Block starts with preamble (8

Block starts with preamble (8--bit flag) and bit flag) and may end with may end with postamblepostamble..

nn Other control information may be added for Other control information may be added for data link layer.data link layer.

8 -bitflag

8 -bitflag

Control ControlData

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 76: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

Chapter 6 EE/CS 450 Fall 99 76

Data Link LayerData Link Layer

nn So far, sending signals over transmission So far, sending signals over transmission medium.medium.

nn Data link layer: responsible for errorData link layer: responsible for error--free free (reliable) communication between adjacent (reliable) communication between adjacent nodes.nodes.

nn Functions: framing, error control, flow Functions: framing, error control, flow control, addressing (in multipoint medium).control, addressing (in multipoint medium).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 77: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

77

Flow ControlFlow Control

nn What is it?What is it?

–– Ensures that transmitter does not overrun Ensures that transmitter does not overrun receiver: limited receiver buffer space.receiver: limited receiver buffer space.

–– Receiver buffers data to process before passing Receiver buffers data to process before passing it up.it up.

–– If no flow control, receiver buffers may fill up If no flow control, receiver buffers may fill up and data may get dropped.and data may get dropped.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 78: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

78

StopStop--andand--Wait Wait

nn Simplest form of flow control.Simplest form of flow control.

–– Transmitter sends frame and waits.Transmitter sends frame and waits.

–– Receiver receives frame and sends ACK.Receiver receives frame and sends ACK.

–– Transmitter gets ACK, sends other frame, and waits, until Transmitter gets ACK, sends other frame, and waits, until no more frames to send.no more frames to send.

nn Good when few frames. Good when few frames.

nn Problem: inefficient link utilization.Problem: inefficient link utilization.

–– In the case of high data rates or long propagation delays.In the case of high data rates or long propagation delays.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 79: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

79

Sliding Window 1

Sliding Window 1

nn Allows multiple frames to be in transit at Allows multiple frames to be in transit at the same time.the same time.

nn Receiver allocates buffer space for Receiver allocates buffer space for nnframes.frames.

nn Transmitter is allowed to send Transmitter is allowed to send nn (window (window size) frames without receiving ACK.size) frames without receiving ACK.

nn Frame sequence number: labels frames.Frame sequence number: labels frames.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 80: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

80

Sliding Window 2

Sliding Window 2

nn Receiver Receiver ack’sack’s frame by including sequence frame by including sequence number of next expected frame.number of next expected frame.

nn Cumulative ACK: Cumulative ACK: ack’sack’s multiple frames.multiple frames.

nn

Example: if receiver receives frames 2,3,

Example: if receiver receives frames 2,3,

and 4, it sends an ACK with sequence

and 4, it sends an ACK with sequence

number 5, which

number 5, which ack’sack’s

receipt of 2, 3, and

receipt of 2, 3, and

4.

4.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 81: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

81

Sliding Window 3

Sliding Window 3

nn Sender maintains sequence numbers it’s Sender maintains sequence numbers it’s allowed to send; receiver maintains allowed to send; receiver maintains sequence number it can receive. These lists sequence number it can receive. These lists are sender and receiver windows.are sender and receiver windows.

nn Sequence numbers are bounded; if frame Sequence numbers are bounded; if frame reserves kreserves k--bit field for sequence numbers, bit field for sequence numbers,

then they can range from 0 … 2

then they can range from 0 … 2kk --

1 and are

1 and are

modulo 2

modulo 2kk. .

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 82: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

82

Sliding Window 4

Sliding Window 4

nn Transmission window shrinks each time Transmission window shrinks each time frame is sent, and grows each time an ACK frame is sent, and grows each time an ACK is received.is received.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 83: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

83

Example: 3

Example: 3--bit sequence number bit sequence number

and window size 7

and window size 7A BA B

0 1 2 3 4 5 6 7 0 1 2 3 4... 0 1 2 3 4 5 6 7 0 1 2 3 4

0 1 2 3 4 5 6 7 0 1 2 3 4... 0 1 2 3 4 5 6 7 0 1 2 3 4

01

2

0 1 2 3 4 5 6 7 0 1 2 3 4

0 1 2 3 4 5 6 7 0 1 2 3 4

RR3

0 1 2 3 4 5 6 7 0 1 2 3 4

3456

RR4

0 1 2 3 4 5 6 7 0 1 2 3 4

0 1 2 3 4 5 6 7 0 1 2 3 4

0 1 2 3 4 5 6 7 0 1 2 3 4

0 1 2 3 4 5 6 7 0 1 2 3 4

0 1 2 3 4 5 6 7 0 1 2 3 4

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 84: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

84

Sliding Window (cont’d)Sliding Window (cont’d)

nn RR RR nn acknowledges up to frame acknowledges up to frame nn--11..

nn There is also RNR There is also RNR nn, which , which ack’sack’s up to up to frame frame nn--11 but no longer accepts more but no longer accepts more frames.frames.

nn RNR shuts down the receive window and RNR shuts down the receive window and consequently the transmission window.consequently the transmission window.

nn Need subsequent RR to reNeed subsequent RR to re--open window.open window.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 85: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

85

PiggybackingPiggybacking

nn

When both endpoints transmit, each keeps 2

When both endpoints transmit, each keeps 2 windows, transmitter and receiver windows.windows, transmitter and receiver windows.

nn Each send data and need to send Each send data and need to send ACKsACKs..

nn When sending data, transmitter can When sending data, transmitter can “piggyback” the acknowledgment “piggyback” the acknowledgment information.information.

nn When no data, send just the ACK.When no data, send just the ACK.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 86: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

86

Duplicate Duplicate ACKsACKs

nn When no data, must reWhen no data, must re--send last ACK. send last ACK.

nn Duplicate Duplicate ACKsACKs: report potential errors.: report potential errors.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 87: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

87

Error DetectionError Detection

nn Transmission impairments lead to Transmission impairments lead to

transmission errors: change of 1 or more

transmission errors: change of 1 or more bits in transmitted frame.bits in transmitted frame.

nn Transmission errors defined using Transmission errors defined using probabilities: transmission medium modeled probabilities: transmission medium modeled as a statistical system.as a statistical system.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 88: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

88

Error Probabilities 1

Error Probabilities 1

nn Definitions:Definitions:

–– PPbb probability of single bit error (bit error rate); probability of single bit error (bit error rate); constant and independent for each bit.constant and independent for each bit.

–– PP11 probability frame received with no errors.probability frame received with no errors.

–– PP22

probability frame received with 1 or more

probability frame received with 1 or more undetected errors.undetected errors.

–– PP33

probability frame received with 1 or more

probability frame received with 1 or more detected bit errors, but no undetected ones.detected bit errors, but no undetected ones.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 89: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

89

Error Probabilities 2

Error Probabilities 2

nn If no error detection mechanism, PIf no error detection mechanism, P33

= 0.

= 0.

nn PP11

= (1

= (1 -- PPbb))FF and Pand P22

= (1

= (1-- PP11), where F is ), where F is size of frame in bits.size of frame in bits.

nn PP11 decreases as decreases as PPbb increases.increases.

nn PP11 decreases as F increases.decreases as F increases.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 90: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

90

ExampleExample

nn 6464--kbps ISDN channel’s bit error rate is less kbps ISDN channel’s bit error rate is less

than 10

than 10--66

. User requirement of at most 1 frame

. User requirement of at most 1 frame with undetected bit error per day. Frame is with undetected bit error per day. Frame is

1000 bits.

1000 bits.––

In a day, 5.529 x 10

In a day, 5.529 x 1066 frames transmitted.frames transmitted.

–– RequiredRequired

frame error rate of 1/ 5.529 x 10

frame error rate of 1/ 5.529 x 1066, or P, or P22

= 0.18 x 10

= 0.18 x 10--66..

–– But But PPbb

= 10

= 10--66, so P, so P11

= (1

= (1--PPbb))FF

= 0.999 and P

= 0.999 and P22

= 1

= 1 --PP11

= 10

= 10--33, which is >>> required P, which is >>> required P22

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 91: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

91

Error Detection Schemes Error Detection Schemes

nn Transmitter adds additional bits for error detection.Transmitter adds additional bits for error detection.

nn Transmitter computes error detection bits as function Transmitter computes error detection bits as function of original data.of original data.

nn Receiver performs same calculation and compares Receiver performs same calculation and compares results. If mismatch, then error.results. If mismatch, then error.

nn PP33 probability error detection scheme detects error; Pprobability error detection scheme detects error; P22

residual error rate or probability error goes residual error rate or probability error goes undetected.undetected.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 92: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

92

ParityParity

nn Simplest error detection scheme.Simplest error detection scheme.

nn Append parity bit to data block.Append parity bit to data block.

nn Example: ASCII transmissionExample: ASCII transmission

––

1 parity bit appended to each 7

1 parity bit appended to each 7--bit ASCII bit ASCII character.character.

––

Even parity: 8

Even parity: 8--

bit code has even number of 1’s.

bit code has even number of 1’s.

––

Odd parity: 8

Odd parity: 8--

bit code has odd number of 1’s.

bit code has odd number of 1’s.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 93: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

93

Parity Check Parity Check

nn

Example: transmitting ASCII “G” (1110001)

Example: transmitting ASCII “G” (1110001) using odd parity.using odd parity.

––

Code transmitted is 11100011.

Code transmitted is 11100011.

–– Receiver checks received code and if odd number Receiver checks received code and if odd number

of 1’s, assumes no error.

of 1’s, assumes no error.

––

Suppose it receives 11000011, then detects error.

Suppose it receives 11000011, then detects error.

––

NOTE: If more than 2 bits in error, may not be

NOTE: If more than 2 bits in error, may not be detected.detected.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 94: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

94

Cyclic Redundancy CheckCyclic Redundancy Check

nn CRC is one of the most effective and common CRC is one of the most effective and common error detecting schemes.error detecting schemes.

nn Let M be Let M be mm--bit message, G (bit message, G (

r+1)

r+1)--bit pattern.bit pattern.

–– Transmitter appends Transmitter appends rr

0’s to M, 2

0’s to M, 2rr*M.*M.

––

Divide 2

Divide 2rr

*M by G and add remainder to 2

*M by G and add remainder to 2rr*M *M forming T (m+r bits), which is transmitted.forming T (m+r bits), which is transmitted.

–– Receiver computes T/G; if remainder, then error.Receiver computes T/G; if remainder, then error.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 95: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

95

CRC ExampleCRC Example

nn

Frame M 1010001101 = x

Frame M 1010001101 = x99+x+x77+x+x33+x+x22+x+x00..

nn

Pattern G 110101.

Pattern G 110101.

nn

Dividing (frame*2

Dividing (frame*2

5)

5) by pattern results in by pattern results in

01110.

01110.

nn

Thus T 101000110101110.

Thus T 101000110101110.

nn Receiver can detect errors unless received Receiver can detect errors unless received message message TTrr is divisible by G.is divisible by G.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 96: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

96

CRCCRC

nn Patterns are expressed as polynomials G(x).Patterns are expressed as polynomials G(x).

nn Example: Example:

–– CRCCRC--

16 = x

16 = x1616+x+x1515+x+x22

+1

+1

–– CRCCRC--CCITT = XCCITT = X1616+x+x1212+x+x55

+1

+1

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 97: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

97

CRCCRC--Based DetectionBased Detection

nn If suitably selected polynomials, CRC can If suitably selected polynomials, CRC can detect:detect:

–– All singleAll single--bit errors.bit errors.

–– All doubleAll double--bit errors, as long as P(X) has at least bit errors, as long as P(X) has at least

three 1’s.

three 1’s.

–– Any odd number of errors as long as P(X) Any odd number of errors as long as P(X)

contains factor (X+1).

contains factor (X+1).

–– Any burst error whose length is <= Any burst error whose length is <= sizeof(FCSsizeof(FCS).).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 98: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

98

Error ControlError Control

nn Mechanisms to detect and correct transmission Mechanisms to detect and correct transmission errors.errors.

nn

Consider 2 types of errors:

Consider 2 types of errors:–– Lost frame: frame is sent but never arrives.Lost frame: frame is sent but never arrives.

–– Damaged frame: frame arrives but in error.Damaged frame: frame arrives but in error.

nn Error control: combination of error detection, Error control: combination of error detection, feedback (ACK or NACK) from receiver, and feedback (ACK or NACK) from receiver, and retransmission by source.retransmission by source.

nn Coupled with flow control feedback.Coupled with flow control feedback.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 99: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

99

ARQARQ

nn ARQ: automatic repeat request.ARQ: automatic repeat request.

nn Works by creating a reliable data link from Works by creating a reliable data link from an unreliable one.an unreliable one.

nn

3 versions:

3 versions:

–– StopStop--andand--wait ARQ.wait ARQ.

–– GoGo--backback--N ARQ.N ARQ.

–– SelectiveSelective--reject ARQ.reject ARQ.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 100: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

100

StopStop--andand--Wait ARQWait ARQ

nn Single outstanding frame at any time.Single outstanding frame at any time.

nn Simple but inefficient.Simple but inefficient.

nn Use of timers to trigger retransmission of data Use of timers to trigger retransmission of data or or ACKsACKs..

nn

2 types of errors:

2 types of errors:–– Damaged or lost frame.Damaged or lost frame.

–– Damaged or lost ACK.Damaged or lost ACK.

nn

Sequence numbers alternate between 0 and 1.

Sequence numbers alternate between 0 and 1.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 101: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

101

StopStop--andand--Wait ARQ: ExampleWait ARQ: Example

Sender Receiver

Frame 0

ACK1

Frame 1

ACK 0

Frame 0

Timeout

Frame 0

ACK 1

Timeout

Frame 0

ACK 1 B discards duplicate.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 102: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

102

GoGo--BackBack--N ARQN ARQ

nn Variation of sliding window for error control.Variation of sliding window for error control.

nn Allows a window’s worth of frames to be in Allows a window’s worth of frames to be in transit at any time.transit at any time.

nn RR: RR: ack’sack’s receipt of frame.receipt of frame.

nn REJ: negative acknowledgment indicating the REJ: negative acknowledgment indicating the frame in error.frame in error.

nn Destination discards frame in error plus Destination discards frame in error plus subsequent frames.subsequent frames.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 103: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

103

GoGo--BackBack--N ARQ ExampleN ARQ Example

S R S R

f0

f1

f2

rr3

f3

f4

f5

rr4

Error

f6

rej5

f7

f5

f6

rr6

f7

5, 6, 7rexm.

f7

f0

f1

rr0

rr(P bit

=1)

rr2

f2

Timeout

Discarded

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 104: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

104

GoGo--BackBack--N ARQ IssuesN ARQ Issues

nn For For kk--bit sequence number, maximum bit sequence number, maximum

window size is (2

window size is (2kk--

1).

1).

–– If window size is too large, If window size is too large, ACKsACKs may be may be ambiguous: not clear if ACK is a duplicate ambiguous: not clear if ACK is a duplicate ACK (errors occurred).ACK (errors occurred).

––

Example: 3

Example: 3--

bit sequence number and 8

bit sequence number and 8 --frame frame window.window.

»»

Source transmits f0, gets back rr1, then sends f1

Source transmits f0, gets back rr1, then sends f1----

f0,

f0,

and gets back another rr1. ???

and gets back another rr1. ???

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 105: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

105

SelectiveSelective--Reject ARQReject ARQ

nn Only frames transmitted are the ones that Only frames transmitted are the ones that are are NACK’edNACK’ed (SREJ) or that timeout.(SREJ) or that timeout.

nn More efficient than GoMore efficient than Go--BackBack--N regarding N regarding amount of amount of reXmissionsreXmissions..

nn But, receiver must buffer outBut, receiver must buffer out--ofof--order order frames.frames.

nn More restriction on maximum window size; More restriction on maximum window size; for kfor k--

bit sequence #’s, 2

bit sequence #’s, 2kk--11 window.window.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 106: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

106

Example Data Link Layer Example Data Link Layer ProtocolProtocol

nn HighHigh--Level Data Link Control (HDLC)Level Data Link Control (HDLC)

–– WidelyWidely--used (ISO standard).used (ISO standard).

–– Single frame format.Single frame format.

–– Synchronous transmission.Synchronous transmission.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 107: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

107

HDLC: Frame FormatHDLC: Frame Format

––

Flag: frame delimiters (01111110).

Flag: frame delimiters (01111110).

–– Address field for multipoint links.Address field for multipoint links.

–– 1616--

bit or 32

bit or 32--bit CRC.bit CRC.

––

Refer to book (pages 176

Refer to book (pages 176--

185) for more details.

185) for more details.

8bits

8ext.

8 or16

variable

16 or32

8

flag address control data FCS flag

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 108: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

108

Other DLL Protocols 1

Other DLL Protocols 1

nn LAPB: Link Access Procedure, Balanced.LAPB: Link Access Procedure, Balanced.

––

Part of the X.25 standard.

Part of the X.25 standard.

–– Subset of HDLC.Subset of HDLC.

–– Link between user system and switch.Link between user system and switch.

–– Same frame format as HDLC.Same frame format as HDLC.

nn LAPD: Link Access Procedure, DLAPD: Link Access Procedure, D--Channel.Channel.

–– Part of the ISDN standard.Part of the ISDN standard.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 109: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

109

Other DLL Protocols 2

Other DLL Protocols 2

nn LLC: Logical Link Control.LLC: Logical Link Control.

––

Part of the 802 protocol family for LANs.

Part of the 802 protocol family for LANs.

–– Link control functions divided between the Link control functions divided between the MAC layer and the LLC layer.MAC layer and the LLC layer.

–– LLC layer operates on top of MAC layer.LLC layer operates on top of MAC layer.

Dst.MACaddr

Src.MACaddr

FCSDst.LLCaddr

Src.LLCaddr

LLCctl. DataMAC

control

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 110: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

110

Other DLL Protocols 3

Other DLL Protocols 3

nn SLIP: Serial Line IPSLIP: Serial Line IP

–– DialDial--up protocol.up protocol.

–– No error control.No error control.

–– Not standardized.Not standardized.

nn PPP: PointPPP: Point--toto--Point ProtocolPoint Protocol

–– Internet standard for dialInternet standard for dial--up connections.up connections.

–– Provides framing similar to HDLC.Provides framing similar to HDLC.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 111: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

111

MultiplexingMultiplexing

nn Sharing a link/channel among multiple Sharing a link/channel among multiple sourcesource--destination pairs.destination pairs.

nn Example: highExample: high--capacity longcapacity long--distance distance trunks (fiber, microwave links) carry trunks (fiber, microwave links) carry multiple connections at the same time.multiple connections at the same time.

MU

X

...

DE

MU

X ...

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 112: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

112

Multiplexing TechniquesMultiplexing Techniques

nn

3 basic types:

3 basic types:

–– FrequencyFrequency--Division Multiplexing (FDM).Division Multiplexing (FDM).

–– TimeTime--Division Multiplexing (TDM).Division Multiplexing (TDM).

–– Statistical TimeStatistical Time--Division Multiplexing Division Multiplexing (STDM).(STDM).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 113: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

113

FDM 1

FDM 1

nn High bandwidth medium when compared to High bandwidth medium when compared to signals to be transmitted.signals to be transmitted.

nn Widely used (e.g., TV, radio).Widely used (e.g., TV, radio).

nn Various signals carried simultaneously Various signals carried simultaneously where each one modulated onto different where each one modulated onto different carrier frequency, or carrier frequency, or channelchannel..

nn Channels separated by Channels separated by guard bandsguard bands(unused) to prevent interference.(unused) to prevent interference.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 114: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

114

FDM 2

FDM 2

Time

Frequency

1 2 N

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 115: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

115

TDM 1

TDM 1

nn TDM or synchronous TDM.TDM or synchronous TDM.

nn High data rate medium when compared to High data rate medium when compared to signals to be transmitted.signals to be transmitted.

Time

Frequency

12

N

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 116: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

116

TDM 2

TDM 2

nn Time divided into time slots.Time divided into time slots.

nn Frame consists of cycle of time slots.Frame consists of cycle of time slots.

nn

In each frame, 1 or more slots assigned to a

In each frame, 1 or more slots assigned to a data source.data source.

1 2 N... 1 2 ... N

frame Time

U1

U2 ... UN

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 117: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

117

TDM 3

TDM 3

nn No control info at this level.No control info at this level.

nn Flow and error control?Flow and error control?–– To be provided on a perTo be provided on a per--channel basis.channel basis.

–– Use DLL protocol such as HDLC.Use DLL protocol such as HDLC.

nn Examples: SONET (Synchronous Optical Examples: SONET (Synchronous Optical Network) for optical fiber.Network) for optical fiber.

nn +’s: simple, fair.+’s: simple, fair.

nn --’s: inefficient.’s: inefficient.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 118: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

118

Statistical TDM 1

Statistical TDM 1

nn Or asynchronous TDM.Or asynchronous TDM.

nn Dynamically allocates time slots on demand.Dynamically allocates time slots on demand.

nn NN input lines in statistical multiplexer, but input lines in statistical multiplexer, but only only kk slots on TDM frame, where slots on TDM frame, where k < nk < n..

nn Multiplexer scans input lines collecting data Multiplexer scans input lines collecting data until frame is filled.until frame is filled.

nn DemultiplexerDemultiplexer receives frame and distributes receives frame and distributes data accordingly.data accordingly.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 119: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

119

STDM 2

STDM 2

nn Data rate on Data rate on mux’edmux’ed line < sum of data rates line < sum of data rates from all input lines.from all input lines.

nn Can support more devices than TDM using Can support more devices than TDM using same link.same link.

nn Problem: peak periods.Problem: peak periods.–– Solution: multiplexers have some buffering Solution: multiplexers have some buffering

capacity to hold excess data.capacity to hold excess data.

–– Tradeoff data rate and buffer size (response Tradeoff data rate and buffer size (response time).time).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 120: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

120

Local Area Networks 1

Local Area Networks 1

nn Interconnect devices over short distances.Interconnect devices over short distances.

–– Within same floor,Within same floor,

–– Building,Building,

–– Campus.Campus.

nn Characterized by low delays.Characterized by low delays.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 121: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

121

LANs 2

LANs 2

nn Typically use broadcast medium.Typically use broadcast medium.

–– Hosts share same communication medium.Hosts share same communication medium.

–– Also called multipleAlso called multiple--access networks.access networks.

nn LANs are characterized by:LANs are characterized by:

–– Topology.Topology.

–– Transmission medium.Transmission medium.

–– Medium access control mechanism.Medium access control mechanism.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 122: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

122

LAN Protocol ArchitectureLAN Protocol Architecture

nn LAN protocol standards collectively known LAN protocol standards collectively known

as IEEE 802 reference model.

as IEEE 802 reference model.

Physical

Data link

Network

Transport

Session

Presentation

Application

PhysicalMACLLC

OSI

IEEE802

Upper layerprotocols

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 123: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

123

LAN ProtocolsLAN Protocols

nn MAC MAC sublayersublayer: performs functions that : performs functions that control access to shared medium.control access to shared medium.

nn LLC: performs flow and error control and LLC: performs flow and error control and provides services to upper layer.provides services to upper layer.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 124: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

124

802 standards 1

802 standards 1

nn

Text book page 367.

Text book page 367.

nn

LLC: IEEE 802.2

LLC: IEEE 802.2

–– connectionless and connection oriented connectionless and connection oriented services.services.

–– Reliable and unreliable.Reliable and unreliable.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 125: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

125

802 standards 2

802 standards 2

nn MAC + physical layersMAC + physical layers

–– 802.3802.3 802.5802.5

»» Bus/tree/star topologies.Bus/tree/star topologies. Ring topology.Ring topology.

»» CSMA/CD.CSMA/CD. Token ring.Token ring.

–– 802.4802.4 FDDIFDDI

»» Bus/tree/star topologies.Bus/tree/star topologies. Dual bus (optical).Dual bus (optical).

»» Token bus.Token bus. Token ring.Token ring.

–– 802.11802.11

»» Wireless.Wireless.

»» CSMA.CSMA.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 126: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

126

EncapsulationEncapsulation

Application data

header

header

header

header

TCP

IP

LLC

MAC MACtrailer

TCP segment

IP datagramLLC PDU

MAC frame

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 127: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

127

MAC Frame FormatMAC Frame Format

Dst.MACaddr

Src.MACaddr

CRCDst.LLCaddr

Src.LLCaddr

LLC PDUMACcontrol

MAC control: protocol information (protocol type, version #).Destination MAC address: physical address of LAN destination.Source MAC address: physical address of the LAN source.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 128: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

128

LAN TopologiesLAN Topologies

Star

Central node

Ring

Bus

Tree

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 129: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

129

Bus TopologyBus Topology

nn Use of multipoint medium.Use of multipoint medium.

nn Stations attach to bus through Stations attach to bus through taptap..

–– FullFull--duplex communication allows data to be sent duplex communication allows data to be sent to/received from bus.to/received from bus.

nn Transmission from any station propagates in Transmission from any station propagates in both directions and is received by all.both directions and is received by all.

–– At each end, At each end, terminatorterminator absorbs and removes absorbs and removes signal from bus.signal from bus.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 130: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

130

Tree TopologyTree Topology

nn Tree is generalization of bus.Tree is generalization of bus.

nn HeadendHeadend

: start of 1 or more cables

: start of 1 or more cables (branches).(branches).

nn Transmission from one station propagates to Transmission from one station propagates to all others.all others.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 131: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

131

Issues Issues

nn Inherently, broadcast.Inherently, broadcast.

–– Frames to transmit data.Frames to transmit data.

–– Need for specifying the destination.Need for specifying the destination.

–– Addresses.Addresses.

nn MultiMulti--access.access.

–– Need for controlling access to medium.Need for controlling access to medium.

»» Avoid collisions.Avoid collisions.

»» MAC protocol.MAC protocol.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 132: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

132

Ring Topology 1

Ring Topology 1

nn Stations attach to Stations attach to repeatersrepeaters..

nn Repeaters are linked to each other by pointRepeaters are linked to each other by point--toto--point links forming a closed loop.point links forming a closed loop.

nn Links are unidirectional.Links are unidirectional.

nn Repeaters: receive data from one link and Repeaters: receive data from one link and repeat it on the other with no buffering.repeat it on the other with no buffering.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 133: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

133

Ring 2

Ring 2

nn Stations transmit/receive via repeater.Stations transmit/receive via repeater.

nn Frames circulate past all stations; Frames circulate past all stations; destination copies frame as it goes by; destination copies frame as it goes by; source removes frame.source removes frame.

nn Ring shared by multiple stations.Ring shared by multiple stations.

–– Need MAC protocol.Need MAC protocol.

»» Determine when each station may insert frame.Determine when each station may insert frame.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 134: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

134

Star TopologyStar Topology

nn Each station directly connected to central node Each station directly connected to central node via pointvia point--toto--point link.point link.

nn Central node’s modes of operation:Central node’s modes of operation:

–– Broadcast mode: node broadcasts received frame Broadcast mode: node broadcasts received frame on all other links; logically works like bus.on all other links; logically works like bus.

–– Switching mode: node sends frame out only on the Switching mode: node sends frame out only on the link to the destination.link to the destination.

nn Central node as singleCentral node as single--point of failure.point of failure.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 135: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

135

Medium Access ControlMedium Access Control

nn Control access to shared medium.Control access to shared medium.

nn Where and how?Where and how?

nn Where: centralized versus decentralized.Where: centralized versus decentralized.

nn How: synchronous versus asynchronous.How: synchronous versus asynchronous.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 136: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

136

Centralized versus Distributed Centralized versus Distributed MACMAC

nn Centralized approaches:Centralized approaches:

–– Controller grants access to medium.Controller grants access to medium.

–– Simple, greater control: priorities, Simple, greater control: priorities, qosqos..

–– But, single point of failure and performance But, single point of failure and performance bottleneck. bottleneck.

nn Decentralized schemes:Decentralized schemes:

–– All stations collectively run MAC to decide All stations collectively run MAC to decide when to transmit.when to transmit.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 137: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

137

Synchronous versus Synchronous versus AsynchronousAsynchronous

nn Synchronous approaches:Synchronous approaches:

–– Static channel allocation.Static channel allocation.

–– Examples: FDM, TDM.Examples: FDM, TDM.

–– Simple but inefficient.Simple but inefficient.

nn Asynchronous or dynamic: Asynchronous or dynamic:

–– Example: STDM.Example: STDM.

––

3 categories: round

3 categories: round--robin, reservation, and robin, reservation, and contention.contention.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 138: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

138

RoundRound--Robin MACRobin MAC

nn Each station is allowed to transmit; station may Each station is allowed to transmit; station may decline or transmit (bounded by some maximum decline or transmit (bounded by some maximum transmit time).transmit time).

nn Centralized (e.g., polling) or distributed control of Centralized (e.g., polling) or distributed control of who is next to transmit.who is next to transmit.

nn When done, station relinquishes and right to transmit When done, station relinquishes and right to transmit goes to next station.goes to next station.

nn Efficient when many stations have data to transmit Efficient when many stations have data to transmit over extended period (stream).over extended period (stream).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 139: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

139

ReservationReservation

nn Time divided into slots.Time divided into slots.

nn Station reserves slots in the future.Station reserves slots in the future.

nn Multiple slots for extended transmissions.Multiple slots for extended transmissions.

nn Suited to stream traffic.Suited to stream traffic.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 140: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

140

ContentionContention

nn No control.No control.

nn Stations try to acquire the medium.Stations try to acquire the medium.

nn Distributed in nature.Distributed in nature.

nn Perform well for Perform well for burstybursty traffic.traffic.

nn Can get very inefficient under heavy load.Can get very inefficient under heavy load.

nn NOTE: roundNOTE: round--robin and contention are the most robin and contention are the most common. common.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 141: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

141

Standardized Standardized MACsMACs

Topologies

Bus Ring

Round robin

Reservation

Contention

Token bus

(802.4)Polling

(802.11)

DQDB

(802.6)

CSMA/CD

(802.3)

CSMA(802.11)

Token ring

(802.5; FDDI)

Techniques

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 142: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

142

LLC for LANsLLC for LANs

nn Similar functions as general Similar functions as general LLCsLLCs..

nn But it has to interface with MAC But it has to interface with MAC sublayersublayer..

nn LLC functions:LLC functions:

–– Addressing: source and destination.Addressing: source and destination.

»» LLC address versus MAC address.LLC address versus MAC address.

––

Control data exchange between 2 users.

Control data exchange between 2 users.

»» User as higherUser as higher--layer protocol in the station.layer protocol in the station.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 143: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

143

LLC ServicesLLC Services

nn

3 different services:

3 different services:

––

Unacknowledged connectionless (type 1).

Unacknowledged connectionless (type 1).

»» No error or flow control.No error or flow control.

»» No delivery guarantees.No delivery guarantees.

–– ConnectionConnection--

mode (type 2).

mode (type 2).

»» Logical connection established.Logical connection established.

»» Flow and congestion control provided.Flow and congestion control provided.

––

Acknowledged connectionless (type 3).

Acknowledged connectionless (type 3).

»» No logical connection.No logical connection.

»» Flow and error control.Flow and error control.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 144: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

144

LLC (802.2) Protocol

LLC (802.2) Protocol

nn Similar to HDLC (ISO standard).Similar to HDLC (ISO standard).

nn LLC PDU:LLC PDU:

DSAP SSAP LLC control Information

1 byte

1 byte

1 or 2 bytes variable

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 145: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

145

Wireless LANsWireless LANs

nn Use wireless transmission media.Use wireless transmission media.

–– Infrared (IR): limited to indoors and single Infrared (IR): limited to indoors and single room (IR light doesn’t penetrate walls).room (IR light doesn’t penetrate walls).

–– RadioRadio

»» Narrowband microwave.Narrowband microwave.

»» Spread Spectrum LANs.Spread Spectrum LANs.

nn For wireless LAN technology comparison, For wireless LAN technology comparison,

see table on page 398.

see table on page 398.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 146: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

146

Wireless LAN ApplicationsWireless LAN Applications

nn Nomadic access (e.g., users roaming around Nomadic access (e.g., users roaming around campus).campus).

nn LAN interconnection (e.g., across LAN interconnection (e.g., across buildings).buildings).

nn Ad Hoc Networks (e.g., disaster relief Ad Hoc Networks (e.g., disaster relief crew).crew).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 147: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

147

MAC ProtocolsMAC Protocols

nn ContentionContention--basedbased

–– ALOHA and Slotted ALOHA.ALOHA and Slotted ALOHA.

–– CSMA.CSMA.

–– CSMA/CD.CSMA/CD.

nn RoundRound--robin : tokenrobin : token--based protocols.based protocols.

–– Token bus.Token bus.

–– Token ring.Token ring.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 148: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

148

The ALOHA ProtocolThe ALOHA Protocol

nn

Developed @ U of Hawaii in early 70’s.

Developed @ U of Hawaii in early 70’s.

nn Packet radio networks.Packet radio networks.

nn “Free for all”: whenever station has a frame to send, “Free for all”: whenever station has a frame to send, it does so.it does so.

–– Station listens for maximum RTT for an ACK.Station listens for maximum RTT for an ACK.

–– If no ACK, reIf no ACK, re--sends frame for a number of times and then sends frame for a number of times and then gives up.gives up.

–– Receivers check FCS and destination address to ACK. Receivers check FCS and destination address to ACK.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 149: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

149

CollisionsCollisions

nn Invalid frames may be caused by channel Invalid frames may be caused by channel noise or noise or

nn Because other station(s) transmitted at the Because other station(s) transmitted at the same time: same time: collisioncollision..

nn Collision happens even when the last bit of Collision happens even when the last bit of a frame overlaps with the first bit of the a frame overlaps with the first bit of the next frame.next frame.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 150: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

150

ALOHA’sALOHA’s

Performance 1

Performance 1

Timet0

t0+t t0

+2t t0

+3t

vulnerable

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 151: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

151

ALOHA’sALOHA’s

Performance 2

Performance 2

nn S = G eS = G e--

2G

2G, where S is the throughput (rate , where S is the throughput (rate of successful transmissions) and G is the of successful transmissions) and G is the offered load.offered load.

nn S = S = SSmaxmax

= 1/2e = 0.184 for G=0.5.

= 1/2e = 0.184 for G=0.5.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 152: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

152

Slotted AlohaSlotted Aloha

nn Doubles performance of ALOHA.Doubles performance of ALOHA.

nn Frames can only be transmitted at beginning Frames can only be transmitted at beginning of slot: “discrete” ALOHA.of slot: “discrete” ALOHA.

nn Vulnerable period is halved.Vulnerable period is halved.

nn S = G eS = G e--GG..

nn S = S = SSmaxmax

= 1/e = 0.368 for G = 1.

= 1/e = 0.368 for G = 1.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 153: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

153

ALOHA ProtocolsALOHA Protocols

nn Poor utilization.Poor utilization.

nn Key property of LANs: propagation delay Key property of LANs: propagation delay between stations is small compared to frame between stations is small compared to frame transmission time.transmission time.

nn Consequence: stations can Consequence: stations can sensesense the the medium before transmitting.medium before transmitting.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 154: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

154

CarrierCarrier--Sense Multiple Access Sense Multiple Access

(CSMA) 1

(CSMA) 1

nn Station that wants to transmit first listens to Station that wants to transmit first listens to check if another transmission is in progress check if another transmission is in progress (carrier sense).(carrier sense).

nn If medium is in use, station waits; else, it If medium is in use, station waits; else, it transmits.transmits.

nn Collisions can still occur.Collisions can still occur.

nn Transmitter waits for ACK; if no Transmitter waits for ACK; if no ACKsACKs, , retransmits.retransmits.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 155: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

155

CSMA 2

CSMA 2

nn Effective when average transmission time >> Effective when average transmission time >> propagation time.propagation time.

nn

Collisions can occur only when 2 or more

Collisions can occur only when 2 or more stations begin transmitting within short time.stations begin transmitting within short time.

nn If station transmits and no collisions during If station transmits and no collisions during the time leading edge of frame propagates to the time leading edge of frame propagates to farthest station, then NO collisions.farthest station, then NO collisions.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 156: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

156

CSMA 3

CSMA 3

nn Maximum utilization is function of frame Maximum utilization is function of frame size and propagation time.size and propagation time.

–– Longer frames or shorter propagation time, Longer frames or shorter propagation time, higher utilization.higher utilization.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 157: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

157

CSMA FlavorsCSMA Flavors

nn 11--

persistent CSMA (IEEE 802.3)

persistent CSMA (IEEE 802.3)

–– If medium idle, transmit; if medium busy, wait If medium idle, transmit; if medium busy, wait

until idle; then transmit with p=1.

until idle; then transmit with p=1.

–– If collision, waits random period to reIf collision, waits random period to re--send.send.

nn NonNon--persistent CSMA: persistent CSMA: after collision, node after collision, node

waits a random time before retransmitting.waits a random time before retransmitting.

nn PP--persistent: persistent: when channel idle detected, when channel idle detected,

transmits packet in the first slot with transmits packet in the first slot with pp..

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 158: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

158

CSMA/CD 1

CSMA/CD 1

nn CSMA with collision detection.CSMA with collision detection.

nn Problem: when frames collide, medium is Problem: when frames collide, medium is unusable for duration of both (damaged) unusable for duration of both (damaged) frames.frames.

nn For long frames (when compared to For long frames (when compared to propagation time), considerable waste.propagation time), considerable waste.

nn What if station listens while transmitting?What if station listens while transmitting?

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 159: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

159

CSMA/CD ProtocolCSMA/CD Protocol

1. If medium idle, transmit; otherwise 2.

1. If medium idle, transmit; otherwise 2.

2. If medium busy, wait until idle, then

2. If medium busy, wait until idle, then

transmit with p=1.

transmit with p=1.

3. If collision detected, transmit brief jamming

3. If collision detected, transmit brief jamming signal and abort transmission.signal and abort transmission.

4. After aborting, wait random time, try again.

4. After aborting, wait random time, try again.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 160: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

160

CSMA/CD PerformanceCSMA/CD Performance

nn Wasted capacity restricted to time to detect Wasted capacity restricted to time to detect collision.collision.

nn

Time to detect collision < 2*maximum

Time to detect collision < 2*maximum propagation delay.propagation delay.

nn Rule in CSMA/CD protocols: frames long Rule in CSMA/CD protocols: frames long enough to allow collision detection prior to enough to allow collision detection prior to end of transmission. end of transmission.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 161: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

161

IEEE 802.3 LAN Standards

IEEE 802.3 LAN Standards

nn

802.3: 10 Mbps Ethernet.

802.3: 10 Mbps Ethernet.

nn

802.3u: 100Mbps (Fast) Ethernet.

802.3u: 100Mbps (Fast) Ethernet.

nn

802.3z: 1Gbps (Gigabit) Ethernet.

802.3z: 1Gbps (Gigabit) Ethernet.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 162: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

162

EthernetEthernet

nn Most popular CSMA/CD protocol.Most popular CSMA/CD protocol.

nn 11--persistent.persistent.

nn Developed at Xerox Developed at Xerox ParcParc

(1976).

(1976).

nn

Different implementations (10Mbps):

Different implementations (10Mbps):

–– Notation: <bps><signaling><max Notation: <bps><signaling><max segseg size size

(100’s of meters)>

(100’s of meters)>

––

Table page 409.

Table page 409.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 163: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

163

Ethernet ImplementationsEthernet Implementations

nn

10Base5 (thick net):

10Base5 (thick net):

up to 500m

up to 500m

segments and 100 stations; coaxial

segments and 100 stations; coaxial

cable(10mm);

cable(10mm); basebandbaseband (Manchester); bus.(Manchester); bus.

nn

10Base2 (thin net):

10Base2 (thin net):

up to 200m segments

up to 200m segments

and 30 stations; coaxial cable(5mm);

and 30 stations; coaxial cable(5mm); basebandbaseband (Manchester); bus(Manchester); bus..

nn

10BaseT:

10BaseT:

up to 100m segments;

up to 100m segments; unshielded TP; unshielded TP; basebandbaseband (Manchester); star.(Manchester); star.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 164: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

164

BasebandBaseband and Broadbandand Broadband

nn Signaling techniques.Signaling techniques.

nn BasebandBaseband: signals transmitted without : signals transmitted without modulation; digital signals represented by modulation; digital signals represented by different voltages (e.g., using Manchester different voltages (e.g., using Manchester encoding).encoding).

nn Broadband: analog signaling; if digital, Broadband: analog signaling; if digital, modulation required.modulation required.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 165: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

165

Ethernet (cont’d)Ethernet (cont’d)

nn Multiple segments can be connected using Multiple segments can be connected using repeatersrepeaters..

Repeater

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 166: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

166

Ethernet Frame FormatEthernet Frame Format

Preamble DA SA Type Data CRC Postamble

Type: identifies upper layer protocol (for demux’ing)

Data: 0-

1500 bytes (min. is 46 bytes).DA and SA: destination and source addresses.

Example: 6:2b:3e:0:0:1d

Broadcast: all 1’s.

Multicast: first bit is 1.Promiscuous mode: stations accept all frames.

8 6 6 2 4 1

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 167: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

167

Ethernet TransmissionEthernet Transmission

nn If channel idle:If channel idle:––

Send frame immediately (p=1).

Send frame immediately (p=1).

–– Waits Waits

2t

2t between backbetween back--toto--back transmissions.back transmissions.

nn If channel busy:If channel busy:––

Wait till free, then transmit (p=1).

Wait till free, then transmit (p=1).

nn If collision:If collision:––

Jam for 512 bits (for both ends to detect collision).

Jam for 512 bits (for both ends to detect collision).

––

Waits for 0

Waits for 0--

2t (1st try), 0

2t (1st try), 0--

4t (2nd try),...

4t (2nd try),...

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 168: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

168

Token Bus 1

Token Bus 1

nn

IEEE 802.4 (1985).

IEEE 802.4 (1985).

nn Token: specialToken: special--purpose frame that purpose frame that circulatescirculates when all stations are idle.when all stations are idle.

nn Physically, token bus is linear or treePhysically, token bus is linear or tree--shaped topology; logically, it operates as shaped topology; logically, it operates as ring.ring.

1 2

345

6

token

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 169: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

169

Token Bus 2

Token Bus 2

nn

In CSMA/CD (802.3) starvation may occur,

In CSMA/CD (802.3) starvation may occur, i.e., stations can wait forever to transmit.i.e., stations can wait forever to transmit.

nn In token bus, every station has a chance to In token bus, every station has a chance to transmit (token).transmit (token).

nn No collisions! i.,e., contentionNo collisions! i.,e., contention--free.free.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 170: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

170

Token Bus 3

Token Bus 3

nn Token passes around in preToken passes around in pre--defined order. defined order.

nn Once station acquires token, it can start Once station acquires token, it can start transmitting.transmitting.

nn When done, passes the token onto next When done, passes the token onto next station.station.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 171: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

171

Token Bus 4

Token Bus 4

nn Limited efficient due to passing of the Limited efficient due to passing of the token.token.

nn Issues:Issues:

–– Adding/removing stations.Adding/removing stations.

–– Lost token problem.Lost token problem.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 172: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

172

Token Ring 1

Token Ring 1

nn

IEEE 802.5 and FDDI.

IEEE 802.5 and FDDI.

nn Most commonly used MAC protocol for Most commonly used MAC protocol for ring topologies.ring topologies.

nn Also uses specialAlso uses special--purpose, circulating purpose, circulating

frame, or token (3 bytes).

frame, or token (3 bytes).

nn Station that wants to transmit waits till Station that wants to transmit waits till token passes by.token passes by.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 173: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

173

Token Ring 2

Token Ring 2

nn When station wants to transmit:When station wants to transmit:

–– Waits for token.Waits for token.

––

Seizes it by changing 1 bit and token becomes

Seizes it by changing 1 bit and token becomes startstart--ofof--frame sequence.frame sequence.

–– Station appends remainder of frame.Station appends remainder of frame.

nn When station seizes token and begins When station seizes token and begins transmission, there’s no token on the ring; transmission, there’s no token on the ring; so nobody else can transmit. so nobody else can transmit.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 174: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

174

Token Ring 3

Token Ring 3

nn Transmitting station inserts new token when:Transmitting station inserts new token when:–– Station completes frame transmission andStation completes frame transmission and

–– Leading edge of frame returns to it after a roundLeading edge of frame returns to it after a round--trip. trip.

nn

If ring length < frame length, 1st. condition

If ring length < frame length, 1st. condition

implies 2nd.

implies 2nd.

nn

2nd. condition ensures only 1 data frame at a

2nd. condition ensures only 1 data frame at a time on the ring.time on the ring.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 175: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

175

Token Ring 4

Token Ring 4

nn Under light load, inefficiency due to waiting Under light load, inefficiency due to waiting for the token to transmit.for the token to transmit.

nn Under heavy load, roundUnder heavy load, round--robin: fair and robin: fair and efficient.efficient.

nn Issues:Issues:–– Token maintenance.Token maintenance.

»» Token loss or duplication.Token loss or duplication.

»» Monitoring station can be responsible for ring Monitoring station can be responsible for ring maintenance (removing duplicates, inserting token)maintenance (removing duplicates, inserting token)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 176: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

176

Token Ring Frame FormatToken Ring Frame Format

1SD AC FC DA SA Data FCS

1 1

2 or 6

2 or 6 4

SD: starting delimiter; indicates starting of frame.AC: access control; PPPTMRRR; PPP and RRR priority and

reservation; M monitor bit; T token or data frame.FC: frame control; if LLC data or control.DA and SA: destination and source addresses.FCS: frame check sequence.

SD AC FC Token frame

ED: ending delimiter; contains the error detection bit E; containsframe continuation bit I (multiple frame transmissions).FS: frame status.

1 1

ED FS

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 177: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

177

Token Ring RevisitedToken Ring Revisited

nn

Single priority: priority and reservation bits = 0.

Single priority: priority and reservation bits = 0.

nn Transmitter seizes token.Transmitter seizes token.

––

Sets token bit to 1.

Sets token bit to 1.

––

Token’s SD and AC are first 2 fields.

Token’s SD and AC are first 2 fields.

––

Station transmits 1 or more frames.

Station transmits 1 or more frames.

–– Until done or tokenUntil done or token--holding timer expires.holding timer expires.

––

When AC of last frame returns, sets token bit to 0, appends

When AC of last frame returns, sets token bit to 0, appends ED: new token. ED: new token.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 178: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

178

Detecting ErrorsDetecting Errors

nn Frame status bits (end delimiter).Frame status bits (end delimiter).

–– A bit: address recognized.A bit: address recognized.

–– C bit: frame copied.C bit: frame copied.

»»

A=0, C=0: destination non

A=0, C=0: destination non--existent or not active.existent or not active.

»»

A=1, C=0: destination exists but frame not copied.

A=1, C=0: destination exists but frame not copied.

»»

A=1, C=1: frame received.

A=1, C=1: frame received.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 179: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

179

Token Ring PriorityToken Ring Priority

nn

Optional priority mechanism in 802.5.

Optional priority mechanism in 802.5.

nn

3 priority bits: 8 priority levels.

3 priority bits: 8 priority levels.

nn Service priority: priority of current token.Service priority: priority of current token.

–– Station can only transmit frame with priority >= Station can only transmit frame with priority >= service priority.service priority.

–– Reservation bits allow station to influence Reservation bits allow station to influence priority levels trying to reserve next token.priority levels trying to reserve next token.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 180: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

180

Early Token ReleaseEarly Token Release

nn Typically, station waits for frame to come Typically, station waits for frame to come back before issuing a new token.back before issuing a new token.

nn Problem: low ring utilization.Problem: low ring utilization.

nn ETR option:ETR option:

–– Station may release token as soon as it Station may release token as soon as it completes transmission.completes transmission.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 181: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

181

Ethernet versus Token RingEthernet versus Token Ring

nn Token ring:Token ring:

–– Efficient at heavy traffic.Efficient at heavy traffic.

–– Guaranteed delay.Guaranteed delay.

–– Fair.Fair.

–– Supports priorities.Supports priorities.

–– But, ring/token maintenance overhead.But, ring/token maintenance overhead.

»» Centralized monitoring.Centralized monitoring.

nn Ethernet is simple!Ethernet is simple!

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 182: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

182

HighHigh--Speed LANsSpeed LANs

nn FDDIFDDI

nn

100VG

100VG--AnyLANAnyLAN

nn Fast EthernetFast Ethernet

nn Gigabit EthernetGigabit Ethernet

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 183: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

183

FDDI 1

FDDI 1

nn Fiber Distributed Data Interface.Fiber Distributed Data Interface.

nn

Similar to 802.5 with some changes due to

Similar to 802.5 with some changes due to higher data rates.higher data rates.

nn

100Mbps, token ring LAN.

100Mbps, token ring LAN.

nn Also suitable for Also suitable for MANsMANs..

nn Fiber or TP as transmission medium.Fiber or TP as transmission medium.

nn

Up to 100 repeaters and up to 2 Km (fiber) or

Up to 100 repeaters and up to 2 Km (fiber) or

100m (TP) between repeaters.

100m (TP) between repeaters.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 184: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

184

FDDI 2

FDDI 2

nn

2 counter

2 counter--rotating fiber rings; only one used rotating fiber rings; only one used for transmission; the other for reliability, for transmission; the other for reliability, i.e., selfi.e., self--healing ring.healing ring.

Normal operation

Under failure Line

failure

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 185: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

185

FDDI 3

FDDI 3

DASSAS

CON

Primaryring

SecondaryringDAS: dual attachment

SAS: single attachmentCON: concentrator

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 186: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

186

FDDI 4

FDDI 4

nn

Basic differences to 802.5:

Basic differences to 802.5:

–– Station waiting for token, seizes token by Station waiting for token, seizes token by failing to repeat it (completely removes it). failing to repeat it (completely removes it).

Original 802.5 technique impractical (high data

Original 802.5 technique impractical (high data rate).rate).

–– Station inserts new frame.Station inserts new frame.

–– Early token release by default.Early token release by default.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 187: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

187

FDDI 5

FDDI 5

nn FDDI can also be implemented using FDDI can also be implemented using twisted pair (copper): CDDI.twisted pair (copper): CDDI.

–– Cheaper.Cheaper.

––

100m.

100m.

nn THT: token holding time.THT: token holding time.

nn TRT: token rotation time.TRT: token rotation time.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 188: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

188

100VG

100VG--

ANYLAN 1

ANYLAN 1

nn VG: voice grade; ANYLAN: support multiple frame VG: voice grade; ANYLAN: support multiple frame types.types.

nn

802.12 (uses new MAC scheme and not CSMA/CD).

802.12 (uses new MAC scheme and not CSMA/CD).

nn

Intended to be 100Mbps extension to Ethernet like

Intended to be 100Mbps extension to Ethernet like

100BASE

100BASE--T.T.

nn MAC scheme: demand priority (determines order in MAC scheme: demand priority (determines order in which nodes share network). which nodes share network).

nn

Supports both 802.3 and 802.5 frames.

Supports both 802.3 and 802.5 frames.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 189: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

189

100VG

100VG--

ANYLAN 2

ANYLAN 2

nn Topology: hierarchical star.Topology: hierarchical star.

Level 1 hub

Level 2 hub

Level 2 hub

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 190: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

190

MAC Protocol 1

MAC Protocol 1

nn SingleSingle--hub networkhub network

–– Station issues request to central hub and waits Station issues request to central hub and waits permission to transmit.permission to transmit.

–– HighHigh-- and lowand low--priority requests.priority requests.

–– Hub scans its ports for requests in RR order, Hub scans its ports for requests in RR order,

e.g., port 1, 2,…, n; it keeps 2 separate pointers

e.g., port 1, 2,…, n; it keeps 2 separate pointers for highfor high-- and lowand low--priority traffic.priority traffic.

–– Services highServices high--priority requests in order; then priority requests in order; then lowlow--priority ones.priority ones.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 191: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

191

MAC Protocol 2

MAC Protocol 2

nn Hierarchical topologyHierarchical topology

1.1 1.2

1.3.1 1.3.2 1.3.3

1.4

1.5.1 1.5.2 1.5.3

1.6 1.7

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 192: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

192

Fast EthernetFast Ethernet

nn

100 Mbps Ethernet.

100 Mbps Ethernet.

nn

IEEE 802.3u, 1995.

IEEE 802.3u, 1995.

nn

Medium alternatives: 100BASE

Medium alternatives: 100BASE--TX TX

(twisted pair) 100BASE

(twisted pair) 100BASE--FX (fiber).FX (fiber).

nn

IEEE 802.3 MAC and frame format.

IEEE 802.3 MAC and frame format.

nn 1010--

fold increase in speed => 10

fold increase in speed => 10--fold fold

reduction in diameter (200m).

reduction in diameter (200m).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 193: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

193

Gigabit EthernetGigabit Ethernet

nn

IEEE 802.3z (1996).

IEEE 802.3z (1996).

nn

Currently over fiber: 1000Base

Currently over fiber: 1000Base--F.F.

nn Modified MAC layer due to high data rates.Modified MAC layer due to high data rates.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 194: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

194

Wireless LANsWireless LANs

nn

IEEE 802.11.

IEEE 802.11.

nn Distributed access control mechanism (DCF) Distributed access control mechanism (DCF) based on CSMA with optional centralized based on CSMA with optional centralized control (PCF).control (PCF).

nn

Physical Layer

DCF

PCFMAClayer

Contention-freeService (polling)

ContentionService(CSMA)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 195: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

195

MAC in Wireless LANsMAC in Wireless LANs

nn Distributed coordination function (DCF) uses Distributed coordination function (DCF) uses CSMACSMA--based protocol (e.g., ad hoc networks).based protocol (e.g., ad hoc networks).

nn CD does not make sense in wireless.CD does not make sense in wireless.–– Hard for transmitter to distinguish its own Hard for transmitter to distinguish its own

transmission from incoming weak signals and transmission from incoming weak signals and noise.noise.

nn Point coordination function (PCF) uses polling Point coordination function (PCF) uses polling to grant stations their turn to transmit (e.g., to grant stations their turn to transmit (e.g., cellular networks).cellular networks).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 196: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

196

Switched EthernetSwitched Ethernet

nn PointPoint--toto--point connections to multipoint connections to multi--port hub port hub acting like switch; no collisions.acting like switch; no collisions.

nn More efficient under high traffic load: break More efficient under high traffic load: break large shared Ethernet into smaller segments.large shared Ethernet into smaller segments.

Hub

Switch

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 197: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

197

LAN InterconnectionLAN Interconnection

nn Extend LAN coverage.Extend LAN coverage.

nn Interconnect different types of LAN.Interconnect different types of LAN.

nn Connect to an Connect to an internetworkinternetwork..

nn Reliability and security. Reliability and security.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 198: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

198

Interconnection SchemesInterconnection Schemes

nn Hubs or repeaters: Hubs or repeaters: physicalphysical--level level

interconnection.interconnection.

–– Devices repeat/amplify signal.Devices repeat/amplify signal.

–– No buffering/routing capability.No buffering/routing capability.

nn Bridges: Bridges: linklink--layer interconnection.layer interconnection.

–– StoreStore--andand--forward frames to destination LAN.forward frames to destination LAN.

–– Need to speak protocols of LANs it interconnect.Need to speak protocols of LANs it interconnect.

nn RoutersRouters: network: network--layer interconnection.layer interconnection.

–– Interconnect different types of networks.Interconnect different types of networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 199: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

199

Bridges 1

Bridges 1

nn Operate at the MAC layer.Operate at the MAC layer.

–– Interconnect LANs of the same type, orInterconnect LANs of the same type, or

–– LANs that speak different MAC protocols.LANs that speak different MAC protocols.

B1 4

5 8

Frames for5-

>8.

Frames for1-

>4

LAN A

LAN B

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 200: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

200

Bridges 2

Bridges 2

nn Function:Function:

–– Listens to all frames on LAN A and accepts Listens to all frames on LAN A and accepts those addressed to stations on LAN B.those addressed to stations on LAN B.

–– Using B’s MAC protocol retransmits the Using B’s MAC protocol retransmits the frames onto B.frames onto B.

–– Does the same for BDoes the same for B--toto--A traffic.A traffic.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 201: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

201

Bridges 3

Bridges 3

nn Behave like a station; have multiple Behave like a station; have multiple

interfaces, 1 per LAN.

interfaces, 1 per LAN.

nn Use destination address to forward Use destination address to forward unicastunicastframes; if destination is on the same LAN, frames; if destination is on the same LAN, drops frame; otherwise forwards it.drops frame; otherwise forwards it.

nn Forward all broadcast frames.Forward all broadcast frames.

nn Have storage and routing capability.Have storage and routing capability.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 202: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

202

Bridges 4

Bridges 4

nn No additional encapsulation.No additional encapsulation.

nn But they may have to do header conversion But they may have to do header conversion if interconnecting different LANs (e.g., if interconnecting different LANs (e.g.,

802.3 to 802.4 frame).

802.3 to 802.4 frame).

nn

May interconnect more than 2 LANs.

May interconnect more than 2 LANs.

nn LANs may be interconnected by more than LANs may be interconnected by more than

1 bridge.

1 bridge.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 203: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

203

Bridge Protocol ArchitectureBridge Protocol Architecture

nn

IEEE 802.1D specification for MAC

IEEE 802.1D specification for MAC bridges.bridges.

PHYMACLLC

Station

LAN LAN

Bridge Station

MAC

PHYPHY

MAC

LLC

PHY

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 204: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

204

Routing with BridgesRouting with Bridges

nn Bridge decides to relay frame based on Bridge decides to relay frame based on destination MAC address.destination MAC address.

nn

If only 2 LANs, decision is simple.

If only 2 LANs, decision is simple.

nn If more complex topologies, routing is If more complex topologies, routing is

needed, i.e., frame may traverse more than 1

needed, i.e., frame may traverse more than 1 bridge.bridge.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 205: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

205

Routing Routing

nn Determining where to send frame so that it Determining where to send frame so that it reaches the destination.reaches the destination.

nn Routing by learning: adaptive or backward Routing by learning: adaptive or backward learning.learning.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 206: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

206

Note on Terminology: Repeaters Note on Terminology: Repeaters and Bridgesand Bridges

nn Repeaters: Repeaters:

–– Extend scope of LANs.Extend scope of LANs.

–– Serve as amplifiers.Serve as amplifiers.

–– No storage/routing capabilities.No storage/routing capabilities.

nn Bridges:Bridges:

–– Also extend scope of LANs.Also extend scope of LANs.

–– Routing/storage capabilities.Routing/storage capabilities.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 207: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

207

BridgesBridges

nn Operate at the data link layer.Operate at the data link layer.

–– Only examine DLL header information.Only examine DLL header information.

–– Do not look at the network layer header.Do not look at the network layer header.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 208: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

208

Routing with BridgesRouting with Bridges

nn

3 algorithms:

3 algorithms:

–– Fixed routing.Fixed routing.

–– Spanning tree.Spanning tree.

–– Source routing.Source routing.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 209: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

209

Fixed RoutingFixed Routing

nn Fixed route for every sourceFixed route for every source--destination destination pair of LANs.pair of LANs.

nn Does not automatically respond to changes Does not automatically respond to changes in load/topology.in load/topology.

nn Statically configured routing matrix (preStatically configured routing matrix (pre--loaded into bridge).loaded into bridge).

nn If alternate routes, pick “shortest” one.If alternate routes, pick “shortest” one.

nn RRijij: first bridge on the route from : first bridge on the route from ii to to jj. .

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 210: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

210

Fixed Routing: ExampleFixed Routing: Example

LAN A

LAN B LAN C

LAN D E F G

1 2 3

4 5 6 7

101

107

102

103104

105 106

Source LAN

101 102 103 107 105 106

A B C D E F G

A

B 101 102 103 104 105 106

102 101 103 107 105 106

101 103 102 104 105 106

107

102

102

104

101

101

102

105

106

103

103

103

107

107

105

105

106

106

Ex: E-

> F: 107; 102; 105.

C

D

E

F

G

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 211: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

211

Fixed RoutingFixed Routing

nn Each bridge keeps Each bridge keeps column for each LAN column for each LAN it attaches.it attaches.

nn Table “From X” Table “From X” derived from column derived from column “x”. “x”.

nn Every entry that has Every entry that has the number of the the number of the bridge results in entry.bridge results in entry.

101 From A From B

Dest Next

B B

C

E

F

G

A AC AD -E -F AG A

D B

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 212: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

212

Fixed RoutingFixed Routing

nn Simple and minimal processing.Simple and minimal processing.

nn Too limited for internets with dynamically Too limited for internets with dynamically changing topology.changing topology.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 213: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

213

Spanning Tree RoutingSpanning Tree Routing

nn AkaAka transparent bridgestransparent bridges..

nn Bridge Bridge routing tablerouting table is automatically is automatically maintained (set up and updated as topology maintained (set up and updated as topology changes).changes).

nn

3 mechanisms:

3 mechanisms:

–– Address learning.Address learning.

–– Frame forwarding.Frame forwarding.

–– Loop resolution. Loop resolution.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 214: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

214

Address Learning 1

Address Learning 1

nn Problem: determine where destinations are.Problem: determine where destinations are.

nn Bridges operate in promiscuous mode, i.e., Bridges operate in promiscuous mode, i.e., accept all frames.accept all frames.

nn Basic idea: look at source address of received Basic idea: look at source address of received frame to learn where that station is (which frame to learn where that station is (which direction frame came from).direction frame came from).

nn Build routing table so that if frame comes Build routing table so that if frame comes from A on interface N, save [A, N]. from A on interface N, save [A, N].

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 215: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

215

Address Learning 2

Address Learning 2

nn When bridges first start, all tables are When bridges first start, all tables are empty.empty.

nn So they flood: every frame for unknown So they flood: every frame for unknown destination, is forwarded on all interfaces destination, is forwarded on all interfaces except the one it came from.except the one it came from.

nn With time, bridges learn where destinations With time, bridges learn where destinations are, and no longer need to flood for known are, and no longer need to flood for known destinations.destinations.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 216: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

216

Backward LearningBackward Learning

nn Bridges look at frame’s (MAC) source Bridges look at frame’s (MAC) source address to find which machine is accessible address to find which machine is accessible on which LAN.on which LAN.

LAN 1

LAN 2

LAN 3

LAN 4

B1

B2

If B1 sees frame from C on LAN 2, RT entry (C, LAN2).

Any frame to C on LAN1 will be forwarded.

But, frame to C on LAN2 will not be forwarded.

CA B

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 217: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

217

Address Learning 3

Address Learning 3

nn RT entries have a timeRT entries have a time--toto--live (TTL). live (TTL).

nn RT entries RT entries refreshedrefreshed when frames from source when frames from source already in the table arrive.already in the table arrive.

nn Periodically, process running on bridge scans Periodically, process running on bridge scans RT and purges RT and purges stalestale entries, i.e., entries older entries, i.e., entries older than TTL.than TTL.

nn Forwarding to unknown destinations reverts to Forwarding to unknown destinations reverts to flooding.flooding.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 218: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

218

Frame ForwardingFrame Forwarding

nn Depends on source and destination LANs.Depends on source and destination LANs.–– If destination LAN (where frame is going to) = If destination LAN (where frame is going to) =

source LAN (where frame is coming from), source LAN (where frame is coming from), discard frame.discard frame.

–– If destination LAN != source LAN, forward If destination LAN != source LAN, forward frame.frame.

–– If destination LAN unknown, flood frame.If destination LAN unknown, flood frame.

nn Special purpose hardware used to perform RT Special purpose hardware used to perform RT lookup and update in few microseconds.lookup and update in few microseconds.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 219: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

219

LoopsLoops

nn Alternate routes: loops.Alternate routes: loops.

nn Example:Example:

––

LAN A, bridge 101,

LAN A, bridge 101,

––

LAN B, bridge 104,

LAN B, bridge 104,

––

LAN E, bridge 107,

LAN E, bridge 107,

–– LAN A.LAN A.

LAN A

LAN B

E

2

4 5

101

103104

1

107

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 220: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

220

Loop: Problems Loop: Problems

A

B

LAN 1

LAN 2

B1

B2

1. Station A sends frame to B; bridges B1 and B2 don’t know B.

2. B1 copies frame onto LAN1; B2 does the same.

3. B2 sees B1’s frame to unknown destination and copies it onto

LAN 2.

4. B1 sees B2’s frame and does the same.

5. This can go on forever.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 221: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

221

Loop ResolutionLoop Resolution

nn Goal: remove “extra” paths by removing Goal: remove “extra” paths by removing “extra” bridges.“extra” bridges.

nn Spanning tree:Spanning tree:

–– Given graph G(V,E), there exists a tree that Given graph G(V,E), there exists a tree that spans all nodes where there is only one path spans all nodes where there is only one path between any pair of nodes, i.e., between any pair of nodes, i.e., NONO loops.loops.

–– LANs are represented by nodes and bridges by LANs are represented by nodes and bridges by edges.edges.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 222: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

222

Definitions 1

Definitions 1

nn Bridge ID: Bridge ID: unique number (e.g., MAC unique number (e.g., MAC address + integer) assigned to each bridge.address + integer) assigned to each bridge.

nn RootRoot: bridge with smallest ID: bridge with smallest ID..

nn CostCost: associated with each interface; : associated with each interface; specifies cost of transmitting frame through specifies cost of transmitting frame through that interface.that interface.

nn Root portRoot port: interface to minimum: interface to minimum--cost path cost path to root.to root.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 223: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

223

Definitions 2

Definitions 2

nn Root path costRoot path cost: cost of path to root bridge.: cost of path to root bridge.

nn Designated bridgeDesignated bridge: on any LAN, bridge : on any LAN, bridge closest to root, i.e., the one with minimum closest to root, i.e., the one with minimum root path cost.root path cost.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 224: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

224

Spanning Tree Algorithm 1

Spanning Tree Algorithm 1

nn

1. Determine root bridge.

1. Determine root bridge.

nn

2. Determine root port on all bridges.

2. Determine root port on all bridges.

nn

3. Determine designated bridges.

3. Determine designated bridges.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 225: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

225

Spanning Tree Algorithm 2

Spanning Tree Algorithm 2

nn Initially all bridges assume they are the root Initially all bridges assume they are the root and broadcast message with its ID, root path and broadcast message with its ID, root path cost.cost.

nn Eventually, lowestEventually, lowest--ID bridge will be known to ID bridge will be known to everyone and will become root.everyone and will become root.

nn Root bridge periodically broadcasts it’s the Root bridge periodically broadcasts it’s the root.root.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 226: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

226

Spanning Tree Algorithm 3

Spanning Tree Algorithm 3

nn Directly connected bridges update their cost Directly connected bridges update their cost to root and broadcast message on other to root and broadcast message on other LANs they are attached.LANs they are attached.

nn This is propagated throughout network.This is propagated throughout network.

nn On any (nonOn any (non--directly connected) LAN, directly connected) LAN, bridge closest to root becomes designated bridge closest to root becomes designated bridge.bridge.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 227: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

227

Spanning Tree: ExampleSpanning Tree: Example

B3

LAN 2

LAN 1

LAN 3

LAN 4

LAN 5

B5

B4

B1

B2

10

10

10

10

5

5

5

5

1055

B3

LAN 2

LAN 1

LAN 3

LAN 4

LAN 5

B5

B4

B1

B2

10

10

10

10

5

5

5

5

1055

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 228: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

228

Spanning Tree: ExampleSpanning Tree: Example

B1

LAN 1

LAN 2

B2

LAN 3

LAN 4

LAN 5

B4

B5

B3

. Only designated bridgeson each LAN allowed toforward frames.

. Bridges continue exchanging info to react to topology changes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 229: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

229

Source Routing 1

Source Routing 1

nn Route determined a priori by sender.Route determined a priori by sender.

nn Route included in the frame header as Route included in the frame header as sequence of LAN and bridge identifiers.sequence of LAN and bridge identifiers.

nn When bridge receives frame:When bridge receives frame:

–– Forward frame if bridge is on the route.Forward frame if bridge is on the route.

–– Discard frame otherwise.Discard frame otherwise.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 230: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

230

Source Routing 2

Source Routing 2

nn Route: sequence of bridges and LANs.Route: sequence of bridges and LANs.

LAN 3

B1

LAN 1

B3

B2

B4

LAN 2

LAN 4X

Z

X-

>Z: L1,B1,L3,B3,L2.X-

>Z: L1,B2,L4,B4,L2

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 231: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

231

Source Routing 4

Source Routing 4

nn No need to maintain routing table.No need to maintain routing table.

–– Frame has all needed routing information.Frame has all needed routing information.

nn However, stations need to find route to However, stations need to find route to destination. destination.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 232: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

232

Route Discovery 1

Route Discovery 1

nn Finding all routes.Finding all routes.

–– If destination is unknown, source sends If destination is unknown, source sends broadcast route discovery frame.broadcast route discovery frame.

–– Frame reaches every LAN. Frame reaches every LAN.

–– When reply comes back, intermediate bridges When reply comes back, intermediate bridges record their id.record their id.

–– Source gets complete route information.Source gets complete route information.

nn Problem: frame explosion.Problem: frame explosion.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 233: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

233

Route Discovery 2

Route Discovery 2

nn Alternative: single Alternative: single route requestroute request frame frame forwarded according to spanning tree.forwarded according to spanning tree.

B3X

Z

B1

B4

LAN 1

LAN 3

LAN 2

LAN 4

Z XSingle-routebroadcast

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 234: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

234

Route Discovery 3

Route Discovery 3

B3X

Z

B1

B4

LAN 1

LAN 3

LAN 2

LAN 4

B2

L2, B3, L3, B1, L1

L2, B4, L4, B2, L1

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 235: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

235

Route SelectionRoute Selection

nn Select minimumSelect minimum--cost route, e.g., minimumcost route, e.g., minimum--hop route.hop route.

nn If tie, choose the one that arrived first.If tie, choose the one that arrived first.

nn Routes are cached with a TTL; when TTL Routes are cached with a TTL; when TTL expires, reexpires, re--discover route.discover route.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 236: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

236

RoutersRouters

nn Operate at the network layer, i.e., inspect Operate at the network layer, i.e., inspect the networkthe network--layer header.layer header.

nn Usually main router functionality Usually main router functionality implemented in software.implemented in software.

nn StoreStore--andand--forward.forward.

nn Ability to interconnect heterogeneous Ability to interconnect heterogeneous networks: address translation, link speed networks: address translation, link speed and packet size mismatch. and packet size mismatch.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 237: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

237

The Network LayerThe Network Layer

Stallings chapters 8, 9, 15, 16 and

Stallings chapters 8, 9, 15, 16 and TanenbaumTanenbaum

chapter 5.

chapter 5.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 238: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

238

Goals Goals

nn Get data from source to destination.Get data from source to destination.

–– May require traversing many hops and May require traversing many hops and involving intermediate routers.involving intermediate routers.

nn In contrast with data link layer: frames from In contrast with data link layer: frames from one end of a wire to the other.one end of a wire to the other.

nn Network layer as lowest endNetwork layer as lowest end--toto--end end transmission layer: multiple hops.transmission layer: multiple hops.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 239: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

239

Routing and InternetworkingRouting and Internetworking

nn Based on knowledge of network topology, Based on knowledge of network topology, choose appropriate paths from source to choose appropriate paths from source to destination.destination.

–– Load balancing across routers and links.Load balancing across routers and links.

–– Avoid congestion.Avoid congestion.

nn Network interconnection: internetworking.Network interconnection: internetworking.

–– Source and destination in different networks.Source and destination in different networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 240: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

240

Design IssuesDesign Issues

nn Services provided to transport layer.Services provided to transport layer.

nn Design/implementation of the subnet.Design/implementation of the subnet.

Router

Router

Router

Subnet

End systemRouter

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 241: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

241

[Circuit[Circuit-- versus Packetversus Packet--Switching]Switching]

nn Circuit SwitchingCircuit Switching

–– Physical circuit (physical connection) is Physical circuit (physical connection) is establish between source and destination establish between source and destination throughout the network (involving switches and throughout the network (involving switches and links).links).

–– This happens before any data can be sent. This happens before any data can be sent.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 242: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

242

Circuit SwitchingCircuit Switching

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 243: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

243

Packet SwitchingPacket Switching

nn Special case of Special case of message switchingmessage switching..

nn No physical path establishment ahead of time.No physical path establishment ahead of time.

nn As data moves from source to destination, As data moves from source to destination, route is formed one hop at a time: route is formed one hop at a time: storestore--andand--forwardforward..

nn OnOn--demand resource acquisition as opposed to demand resource acquisition as opposed to circuit switching where resources reserved circuit switching where resources reserved statically beforehand.statically beforehand.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 244: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

244

ContextContext

nn We are talking about packet switching We are talking about packet switching networks!networks!

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 245: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

245

Services Provided to Transport Services Provided to Transport Layer Layer

nn Network/transport layer interface: typically interface Network/transport layer interface: typically interface between carrier (between carrier (netwrknetwrk service provider) and end service provider) and end user.user.

nn NSP has control over protocols up to network layer.NSP has control over protocols up to network layer.

nn Network/transport interface needs to be very well Network/transport interface needs to be very well defined.defined.

nn Types of service: connectionTypes of service: connection--less versus connectionless versus connection--oriented oriented

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 246: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

246

ConnectionConnection--less serviceless service

nn Internet.Internet.

nn

E2E argument.

E2E argument.

–– Push functionality closer to users.Push functionality closer to users.

nn Error and flow control at higher layers.Error and flow control at higher layers.

nn No delivery or ordering guarantees.No delivery or ordering guarantees.

nn Every packet must carry full destination Every packet must carry full destination address (each packet independent of the address (each packet independent of the other).other).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 247: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

247

ConnectionConnection--orientedoriented

nn Telephone and ATM networks.Telephone and ATM networks.

nn NetworkNetwork--layer connection:layer connection:

–– Logical connection between networkLogical connection between network--layer processes at layer processes at sender and receiver.sender and receiver.

–– Connection ID used to identify Connection ID used to identify PDUsPDUs..

–– Connection set up (Connection set up (QoSQoS, cost negotiation) and tear down., cost negotiation) and tear down.

–– Full duplex communication.Full duplex communication.

–– Reliable and ordered delivery.Reliable and ordered delivery.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 248: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

248

Internet over ATMInternet over ATM

nn Source first establishes ATM networkSource first establishes ATM network--layer layer connection to destination; then send IP connection to destination; then send IP packets over it.packets over it.

nn Inefficient: duplicate functionality.Inefficient: duplicate functionality.

–– Example: ordered delivery guarantees at the Example: ordered delivery guarantees at the ATM network layer and TCP packet reATM network layer and TCP packet re--ordering mechanism.ordering mechanism.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 249: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

249

Network Layer DesignNetwork Layer Design

nn ConnectionConnection--oriented versus connectionoriented versus connection--less less infrastructure.infrastructure.

nn ConnectionConnection--oriented: virtual circuit oriented: virtual circuit

nn ConnectionConnection--less: less: datagramsdatagrams..

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 250: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

250

Virtual CircuitVirtual Circuit

nn Analogy to physical circuits used by Analogy to physical circuits used by telephone networks.telephone networks.

nn At connection establishment time, path At connection establishment time, path from source to destination is selected and from source to destination is selected and used throughout connection lifetime.used throughout connection lifetime.

nn When connection is over, virtual circuit When connection is over, virtual circuit terminated.terminated.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 251: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

251

DatagramDatagram

nn No logical connection.No logical connection.

nn Each packet (datagram) routed Each packet (datagram) routed independently; successive packets may independently; successive packets may follow different routes.follow different routes.

nn More work at intermediate routers, but more More work at intermediate routers, but more robust and adaptive to failures and robust and adaptive to failures and congestion.congestion.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 252: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

252

RoutersRouters

nn For VCs, routers keep a table with (VC For VCs, routers keep a table with (VC number, outgoing interface) entries.number, outgoing interface) entries.

–– Packets only need to carry VC number.Packets only need to carry VC number.

nn For For datagramsdatagrams, routing table., routing table.

–– (destination, outgoing interface) entries.(destination, outgoing interface) entries.

–– Each packet must carry destination address. Each packet must carry destination address.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 253: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

253

Combinations of Service and Combinations of Service and Subnet StructureSubnet Structure

Datagram Virtual Circuit

Connection-less

Connection-oriented

UDPover IP

UPDover IPoverATM

TCP over IP

ATMover ATM

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 254: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

254

Routing Algorithms 1

Routing Algorithms 1

nn Routing is main function of network layer.Routing is main function of network layer.

nn Routing algorithm: decides which route a Routing algorithm: decides which route a packet should take from source to packet should take from source to destination.destination.

–– For router: which interface a packet should be For router: which interface a packet should be forwarded.forwarded.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 255: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

255

Routing Algorithms 2

Routing Algorithms 2

nn If datagram network, decision is made for If datagram network, decision is made for every packet.every packet.

nn If VC, decision is made only once when VC If VC, decision is made only once when VC is setup.is setup.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 256: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

256

Routing MetricsRouting Metrics

nn Routing algorithms can use different Routing algorithms can use different metrics when building/selecting routes.metrics when building/selecting routes.

–– Example:Example:

»» Number of hops.Number of hops.

»» Delay.Delay.

»» Bandwidth.Bandwidth.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 257: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

257

Adaptive and NonAdaptive and Non--adaptive adaptive RoutingRouting

nn NonNon--adaptive routing:adaptive routing:–– Fixed routing, static routing.Fixed routing, static routing.

–– Do not take current state of the network (e.g., load, Do not take current state of the network (e.g., load, topology).topology).

–– Routes are computed in advance, offRoutes are computed in advance, off--line, and downloaded line, and downloaded to routers when booted.to routers when booted.

nn Adaptive routing:Adaptive routing:–– Routes change dynamically as function of current state of Routes change dynamically as function of current state of

network.network.

–– Algorithms vary on how they get routing information, Algorithms vary on how they get routing information, metrics used, and when they change routes.metrics used, and when they change routes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 258: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

258

Optimality PrincipleOptimality Principle

nn General statement about optimal routes (topology, General statement about optimal routes (topology, routing algorithm independent).routing algorithm independent).

nn If router J is on optimal path between I and K, then If router J is on optimal path between I and K, then the optimal path from J to K also falls along the same the optimal path from J to K also falls along the same route.route.–– Proof by contradiction.Proof by contradiction.

nn Corollary:Corollary:–– Set of optimal routes from all sources to destination form a Set of optimal routes from all sources to destination form a

tree rooted at destination.tree rooted at destination.

–– Sink tree.Sink tree.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 259: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

259

Adaptive and NonAdaptive and Non--adaptive adaptive RoutingRouting

nn NonNon--adaptive routing:adaptive routing:–– Fixed routing, static routing.Fixed routing, static routing.

–– Do not take current state of the network (e.g., load, Do not take current state of the network (e.g., load, topology).topology).

–– Routes are computed in advance, offRoutes are computed in advance, off--line, and downloaded line, and downloaded to routers when booted.to routers when booted.

nn Adaptive routing:Adaptive routing:–– Routes change dynamically as function of current state of Routes change dynamically as function of current state of

network.network.

–– Algorithms vary on how they get routing information, Algorithms vary on how they get routing information, metrics used, and when they change routes.metrics used, and when they change routes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 260: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

260

Optimality PrincipleOptimality Principle

nn General statement about optimal routes (topology, General statement about optimal routes (topology, routing algorithm independent).routing algorithm independent).

nn If router J is on optimal path between I and K, then If router J is on optimal path between I and K, then the optimal path from J to K also falls along the same the optimal path from J to K also falls along the same route.route.–– Proof by contradiction.Proof by contradiction.

nn Corollary:Corollary:–– Set of optimal routes from all sources to destination form a Set of optimal routes from all sources to destination form a

tree rooted at destination.tree rooted at destination.

–– Sink tree.Sink tree.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 261: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

261

Static AlgorithmsStatic Algorithms

44 ShortestShortest--path routing.path routing.

44 Flooding.Flooding.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 262: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

262

Shortest Path Routing 1

Shortest Path Routing 1

nn DijkstraDijkstra

(1959).

(1959).

nn Network represented by graph G(V, E), Network represented by graph G(V, E), where V is set of nodes and E is set of links where V is set of nodes and E is set of links connecting nodes.connecting nodes.

nn What is “shortest”?What is “shortest”?–– Different metrics.Different metrics.

–– Example: number of hops (static), geographic Example: number of hops (static), geographic distance (static), delay, bandwidth (raw versus distance (static), delay, bandwidth (raw versus available), combination of a subset of these.available), combination of a subset of these.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 263: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

263

Dijkstra’sDijkstra’s Shortest Path Shortest Path

nn Nodes labeled with distance to source Nodes labeled with distance to source through best known path.through best known path.

nn At start, no known paths so all nodes At start, no known paths so all nodes labeled with infinity.labeled with infinity.

nn As algorithm progresses, nodes are labeled; As algorithm progresses, nodes are labeled; “tentative” labels may change, while “tentative” labels may change, while “permanent” labels don’t change.“permanent” labels don’t change.

nn Label made permanent when it’s known to Label made permanent when it’s known to be in the shortest path to source.be in the shortest path to source.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 264: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

264

Dijkstra’sDijkstra’s Algorithm: ExampleAlgorithm: Example

A

B C

DE

G

F

H

2

7

3

22

32

4

2

6 11

A

B C

DE

G

F

H

2

7

3

22

32

4

2

6 1

(2,A)

(6,A)

A

B C

DE

G

F

H

2

7

3

22

3

4

2

6 1

(2,A)

(6,A)

(9,B)

(4,B)

A

B C

DE F

H

2

7

3

2

(6,E)

4

2

6 1

(2,A)

G(5,E)

(9,B)

(4,B)

A

B C

DE F

2

7

3

2

(6,E)

4

2

6 1

(9,B)

(4,B)A

B C

DE F

2

7

3

2

(6,E)

4

2

6 1

(9,B)

(4,B)

1

H(9,G)

G(5,E)

G(5,E)

H(8,F)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 265: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

265

FloodingFlooding

nn Every incoming packet forwarded on every Every incoming packet forwarded on every outgoing link except the one it arrived on.outgoing link except the one it arrived on.

nn Problem: duplicates.Problem: duplicates.

nn Constraining the flood:Constraining the flood:–– Hop count.Hop count.

–– Keep track of packets that have been flooded.Keep track of packets that have been flooded.

nn Robust, shortest delay (picks shortest path as Robust, shortest delay (picks shortest path as one of the paths).one of the paths).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 266: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

266

Dynamic Routing Algorithms Dynamic Routing Algorithms

nn Distance vector routing.Distance vector routing.

nn Link state routing.Link state routing.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 267: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

267

Distance Vector Routing 1

Distance Vector Routing 1

nn Each router keeps routing table (or routing vector) Each router keeps routing table (or routing vector) giving best known distance to each destination and giving best known distance to each destination and the corresponding outgoing interface.the corresponding outgoing interface.

nn Routing tables are updated by exchanging routing Routing tables are updated by exchanging routing information with neighbors.information with neighbors.

nn AkaAka, Bellman, Bellman--Ford, FordFord, Ford--Fulkerson.Fulkerson.

nn Original ARPANET routing; also used by Internet’s Original ARPANET routing; also used by Internet’s RIP.RIP.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 268: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

268

Distance Vector 2

Distance Vector 2

nn Routing table at each router:Routing table at each router:

–– One entry per participating router.One entry per participating router.

–– Each entry contains outgoing interface and Each entry contains outgoing interface and distance to corresponding destination.distance to corresponding destination.

–– Metric: number of hops, delay, queue length.Metric: number of hops, delay, queue length.

–– Each router knows distance to its neighbors.Each router knows distance to its neighbors.

nn Old ARPANET algorithm: DV where cost Old ARPANET algorithm: DV where cost metric is outgoing link queue length.metric is outgoing link queue length.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 269: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

269

Routing UpdatesRouting Updates

nn Every T interval, routers exchange routing updates.Every T interval, routers exchange routing updates.

nn Routing update from router X consists of a vector Routing update from router X consists of a vector with with all destinationsall destinations and the corresponding distance and the corresponding distance from X to them. from X to them.

nn When router Y receives an update from X, it can When router Y receives an update from X, it can estimate its distance to router Z through X as estimate its distance to router Z through X as DDyzyz = = DDyxyx + + DDxzxz. .

nn Router Y receives update from Router Y receives update from all its neighborsall its neighbors; ; discards its RT and builds a new one.discards its RT and builds a new one.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 270: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

270

Distance Vector: ExampleDistance Vector: Example

1

4

6

2 3

5

1Node Distance Next

23

3

2

1

9

9

5

1

2

1

0 -

2 2 2

3 5 3

4 1 4

5 6 3

6 8 3

T=T0T=T1

3 7 5

2 3 4

0 4 2

3 0 2

2 2 03 1 15 3 3

Node Distance Next

1

0 -

2 2 2

3 3 4

4 1 4

5 2 4

6 4 4

T=T2

7

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 271: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

271

ProblemsProblems

nn Routing loops.Routing loops.

nn Slow convergence.Slow convergence.

nn Counting to infinity.Counting to infinity.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 272: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

272

CountCount--toto--

Infinity 1

Infinity 1

nn Good news propagates faster.Good news propagates faster.

A B C D E

Initially, A down:A comes up:

infinity1

1 2 infinity infinity (afte

r 2 exchanges)

1 2 3 infinity (a

fter 3 exchanges)

1 2 3 4

(after 4 exchanges)

infinityinfinity

infinityinfinity

infinity

infinity (after 1 exchange)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 273: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

273

CountCount--toto--

Infinity 2

Infinity 2

nn But, bad news propagate slower!But, bad news propagate slower!

A B C D E

Initially, all up:A goes down:

1 2 3 4

3 2 3 4

(after 1 exchange)

3 4 3 4

(after 2 exchanges)

5 4 5 4

(after 3 exchanges)

5 6 5 6

(after 4 exchanges)

7 6 7 6

(after 5 exchanges)

7 8 7 8

(after 6 exchanges)….infinity

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 274: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

274

CountCount--toto--

Infinity 3

Infinity 3

nn Gradually routers work their way up to Gradually routers work their way up to infinity.infinity.

nn Number of exchanges depends on how large Number of exchanges depends on how large is infinity.is infinity.

nn To reduce number of exchanges, if metric is To reduce number of exchanges, if metric is number of hops, number of hops, infinity=maximum infinity=maximum

path+1.

path+1.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 275: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

275

SolutionSolution

nn Routing loops:Routing loops:

–– Path vector: record actual path used in the DV.Path vector: record actual path used in the DV.

–– Previous hop tracing: records preceding router.Previous hop tracing: records preceding router.

nn CountCount--toto--infinity: infinity:

–– Split horizon: router reports to neighbor cost Split horizon: router reports to neighbor cost “infinity” for destination if route to that “infinity” for destination if route to that destination is through that neighbor.destination is through that neighbor.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 276: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

276

Split Horizon Split Horizon

nn Tries to make bad news spread faster.Tries to make bad news spread faster.

nn A node reports infinity as distance to node X A node reports infinity as distance to node X on link packets to X are sent on.on link packets to X are sent on.

nn Example, in the first exchange, C tells D its Example, in the first exchange, C tells D its distance to A but tells B its distance to A is distance to A but tells B its distance to A is infinity.infinity.–– So B discovers its link to A is down and C’s So B discovers its link to A is down and C’s

distance to A is infinity; so it sets its distance to A distance to A is infinity; so it sets its distance to A to infinity.to infinity.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 277: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

277

Link State Routing 1

Link State Routing 1

nn

DV routing used in the ARPANET until 1979,

DV routing used in the ARPANET until 1979, when it was replaced by link state routing.when it was replaced by link state routing.

nn Used by the Internet’s OSPF.Used by the Internet’s OSPF.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 278: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

278

Link State Routing 2

Link State Routing 2

nn Link state routing is based on:Link state routing is based on:

–– Discover your neighbors and measure the Discover your neighbors and measure the communication cost to them.communication cost to them.

–– Send updates about your neighbors to all other Send updates about your neighbors to all other routers.routers.

–– Compute shortest path to every other router.Compute shortest path to every other router.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 279: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

279

Finding NeighborsFinding Neighbors

nn When router is booted, its first task is to When router is booted, its first task is to find who its neighbors are.find who its neighbors are.

nn Special singleSpecial single--hop “hello” packets.hop “hello” packets.

nn Cost metric:Cost metric:

––

Number of hops: in this case, always 1.

Number of hops: in this case, always 1.

––

Delay: “echo” packets and measure RTT/2.

Delay: “echo” packets and measure RTT/2.

–– Load?Load?

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 280: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

280

Generating Link State UpdatesGenerating Link State Updates

nn Link state packets (LSP).Link state packets (LSP).–– Sender identity.Sender identity.

–– Sequence number.Sequence number.

–– TTL.TTL.

–– List of (neighbor, cost). List of (neighbor, cost).

nn When to send updates?When to send updates?–– Proactive: periodic updates; how often?Proactive: periodic updates; how often?

–– Reactive: whenever some significant event is detected, Reactive: whenever some significant event is detected, e.g., link goes down.e.g., link goes down.

nn Where to send them? Everywhere: flood. Where to send them? Everywhere: flood.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 281: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

281

Processing UpdatesProcessing Updates

nn When LSP is received:When LSP is received:

–– Check sequence number.Check sequence number.

–– If higher than current sequence number, keep it If higher than current sequence number, keep it and flood it; otherwise, discard it. and flood it; otherwise, discard it.

–– Periodically decrement TTL.Periodically decrement TTL.

»»

When TTL=0, purge LSP.

When TTL=0, purge LSP.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 282: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

282

Computing RoutesComputing Routes

nn Routers have global view of network.Routers have global view of network.

–– They receive updates from all other routers They receive updates from all other routers with their cost to their neighbors.with their cost to their neighbors.

–– Build network graph.Build network graph.

nn Use Use Dijkstra’sDijkstra’s shortestshortest--path algorithm to path algorithm to compute shortest paths to all other nodes.compute shortest paths to all other nodes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 283: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

283

DV versus LSDV versus LS

nn DV:DV:–– Node tells its neighbors what it knows about everybody.Node tells its neighbors what it knows about everybody.

–– Based on other’s knowledge, node chooses best route.Based on other’s knowledge, node chooses best route.

–– Distributed computation.Distributed computation.

nn LS:LS:–– Node tells everyone what it knows about its neighbors.Node tells everyone what it knows about its neighbors.

–– Every node has global view.Every node has global view.

–– Compute their own routes.Compute their own routes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 284: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

284

Hierarchical RoutingHierarchical Routing

nn For scalability:For scalability:

–– As network grows, so does RT size, routing update As network grows, so does RT size, routing update generation, processing, and propagation overhead, and generation, processing, and propagation overhead, and route computation time and resources.route computation time and resources.

nn Divide network into Divide network into routing regionsrouting regions..

–– Routers within region know how to route packets to all Routers within region know how to route packets to all destinations within region.destinations within region.

–– But don’t know how to route within other regions.But don’t know how to route within other regions.

–– “Border” routers: route within regions.“Border” routers: route within regions.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 285: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

285

Hierarchical Routing ExampleHierarchical Routing Example

1B

1A

1C

2A

2B

2C

2D

3A

3B

4A

4B 4C

5E

5D

5C

5B

5A

Dest. Next Hops

1A - -

1B 1B 1

1C 1C 1

2A 1B 2

2B 1B 3

2C 1B 3

2D 1B 4

3A 1C 3

3B 1C 2

4A 1C 3

4B 1C 4

4C 1C 4

5A 1C 4

5B 1C 5

5C 1B 5

5D 1C 6

5E 1C 5

1A

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 286: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

286

Hierarchical Routing ExampleHierarchical Routing Example

1B

1A

1C

2A

2B

2C

2D

3A

3B

4A

4B 4C

5E

5D

5C

5B

5A

Dest. Next Hops

1A - -

1B 1B 1

1C 1C 1

2 1B 2

3 1C 2

4 1C 3

5 1C 4

A

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 287: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

287

Hierarchical RoutingHierarchical Routing

nn Optimal paths are not guaranteed.Optimal paths are not guaranteed.

––

Example: 1A

Example: 1A--

>5C should be via 2 and not 3.

>5C should be via 2 and not 3.

nn How many hierarchical levels?How many hierarchical levels?

––

Example: 720 routers.

Example: 720 routers.

»»

1 level: each router needs 720 RT entries.

1 level: each router needs 720 RT entries.

»»

2 levels: 24 regions of 30 routers: each router’s RT

2 levels: 24 regions of 30 routers: each router’s RT

has 30+23 entries.

has 30+23 entries.

»»

3 levels: 8 clusters of 9 regions with 10 routers: each

3 levels: 8 clusters of 9 regions with 10 routers: each

router’s RT 10+8+7.

router’s RT 10+8+7.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 288: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

288

ManyMany--toto--Many RoutingMany Routing

nn Support manySupport many--toto--many communication.many communication.

nn Example applications: multiExample applications: multi--point data point data distribution, multidistribution, multi--party teleconferencing.party teleconferencing.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 289: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

289

BroadcastingBroadcasting

nn Simplistic approach: send separate packet to Simplistic approach: send separate packet to each destination.each destination.

–– Simple but expensive.Simple but expensive.

–– Source needs to know about all destinations.Source needs to know about all destinations.

nn Flooding:Flooding:

–– May generate too many duplicates (depending May generate too many duplicates (depending on node connectivity).on node connectivity).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 290: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

290

MultidestinationMultidestination RoutingRouting

nn Packet contains list of destinations.Packet contains list of destinations.

nn Router checks destinations and determines Router checks destinations and determines on which interfaces it will forward packet.on which interfaces it will forward packet.

–– Router generates new copy of packet for each Router generates new copy of packet for each output line and includes in packet only the output line and includes in packet only the appropriate set of destinations.appropriate set of destinations.

––

Eventually, packets will only carry 1

Eventually, packets will only carry 1 destination.destination.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 291: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

291

Spanning Tree Routing Spanning Tree Routing

nn Use spanning tree (sink tree) rooted at Use spanning tree (sink tree) rooted at broadcast initiator.broadcast initiator.

nn No need for destination list.No need for destination list.

nn Each on spanning tree forwards packets on all Each on spanning tree forwards packets on all lines on the spanning tree (except the one the lines on the spanning tree (except the one the packet arrived on).packet arrived on).

nn Efficient but needs to generate the spanning Efficient but needs to generate the spanning tree and routers must have that information. tree and routers must have that information.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 292: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

292

Reverse Path ForwardingReverse Path Forwarding

nn Routers don’t have to know spanning tree.Routers don’t have to know spanning tree.

nn Router checks whether broadcast packet Router checks whether broadcast packet arrived on interface used to send packets to arrived on interface used to send packets to source of broadcast.source of broadcast.

–– If so, it’s likely that it followed best route and If so, it’s likely that it followed best route and thus not a duplicate; router forwards packet on thus not a duplicate; router forwards packet on all lines.all lines.

–– If not, packet discarded as likely duplicate.If not, packet discarded as likely duplicate.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 293: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

293

MulticastingMulticasting

nn Special form of broadcasting:Special form of broadcasting:

–– Instead of sending messages to all nodes, send Instead of sending messages to all nodes, send messages to a group of nodes.messages to a group of nodes.

nn Multicast group management:Multicast group management:

–– Creating, deleting, joining, leaving group.Creating, deleting, joining, leaving group.

–– Group management protocols communicate Group management protocols communicate group membership to appropriate routers.group membership to appropriate routers.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 294: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

294

Multicast RoutingMulticast Routing

nn Each router computes spanning tree covering Each router computes spanning tree covering all other participating routers.all other participating routers.

–– Tree is pruned by removing that do not contain Tree is pruned by removing that do not contain any group members.any group members.

1,2

1

1,22

21

1

21,2

1

1,22

2

1

1

2

1

1

1

1

12 2

2

2 2

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 295: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

295

Shared Tree MulticastingShared Tree Multicasting

nn SourceSource--rooted tree approaches don’t scale rooted tree approaches don’t scale well!well!––

1 tree per source, per group!

1 tree per source, per group!

–– Routers must keep state for Routers must keep state for m*nm*n trees, where trees, where mm is number is number of sources in a group and of sources in a group and nn is number of groups.is number of groups.

nn CoreCore--based trees: single tree per group.based trees: single tree per group.–– Host Host unicastunicast message to core, where message is multicast message to core, where message is multicast

along shared tree.along shared tree.

–– Routes may not be optimal for all sources.Routes may not be optimal for all sources.

–– State/storage savings in routers.State/storage savings in routers.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 296: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

296

Midterm Review 1

Midterm Review 1

nn IntroductionIntroduction

–– Basic terminology and concepts.Basic terminology and concepts.

nn Physical LayerPhysical Layer

–– Time and frequency domains.Time and frequency domains.

–– Bandwidth and data rate.Bandwidth and data rate.

–– Analog and digital transmission.Analog and digital transmission.

–– Simplex, halfSimplex, half--duplex and fullduplex and full--duplex duplex transmission.transmission.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 297: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

297

Midterm Review 2

Midterm Review 2

nn Physical Layer (cont’d)Physical Layer (cont’d)

–– Transmission impairments.Transmission impairments.

–– Decibel.Decibel.

–– S/N ratio.S/N ratio.

–– Channel capacity.Channel capacity.

»» NyquistNyquist..

»» Shannon.Shannon.

–– Types on media.Types on media.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 298: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

298

Midterm Review 3

Midterm Review 3

nn Physical Layer (cont’d)Physical Layer (cont’d)

–– Data encoding.Data encoding.

»» DigitalDigital--toto--analog.analog.

»» DigitalDigital--toto--digital.digital.

»» AnalogAnalog--toto--digital.digital.

»» AnalogAnalog--toto--analog.analog.

–– Transmission modes.Transmission modes.

»» Synchronous.Synchronous.

»» Asynchronous.Asynchronous.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 299: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

299

Midterm Review 4

Midterm Review 4

nn Data Link LayerData Link Layer

–– Flow control.Flow control.

»» StopStop--andand--wait.wait.

»» Sliding window.Sliding window.

–– Error control.Error control.

»» Error detection schemes.Error detection schemes.nn Parity.Parity.

nn CRC.CRC.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 300: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

300

Midterm Review 5

Midterm Review 5

nn DLL (cont’d)DLL (cont’d)–– Error control (cont’d)Error control (cont’d)

»» ARQ.ARQ.nn StopStop--andand--wait ARQ.wait ARQ.

nn GoGo--backback--N ARQ.N ARQ.

nn SelectiveSelective--reject ARQ.reject ARQ.

–– Example DLL protocols.Example DLL protocols.

–– Multiplexing.Multiplexing.»» FrequencyFrequency--Division Multiplexing (FDM).Division Multiplexing (FDM).

»» TimeTime--Division Multiplexing (TDM).Division Multiplexing (TDM).

»» Statistical TimeStatistical Time--Division Multiplexing (STDM).Division Multiplexing (STDM).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 301: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

301

Midterm Review 6

Midterm Review 6

nn LANsLANs

–– Protocol architecture.Protocol architecture.

––

802 standards.

802 standards.

–– Encapsulation/deEncapsulation/de--encapsulation.encapsulation.

–– Frame format.Frame format.

–– LAN topologies.LAN topologies.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 302: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

302

Midterm Review 7

Midterm Review 7

nn MACMAC

–– Centralized and distributed.Centralized and distributed.

–– Synchronous and asynchronous.Synchronous and asynchronous.

–– Asynchronous MAC.Asynchronous MAC.

»» RoundRound--robin, reservation, and contention.robin, reservation, and contention.

nn LLC for LANs.LLC for LANs.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 303: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

303

Midterm Review 8

Midterm Review 8

nn MAC protocols.MAC protocols.

–– Contention.Contention.

»» ALOHA and Slotted ALOHA.ALOHA and Slotted ALOHA.

»» CSMA.CSMA.

»» CSMA/CD.CSMA/CD.

–– Reservation.Reservation.

»» Token bus.Token bus.

»» Token ring.Token ring.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 304: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

304

Midterm Review 9

Midterm Review 9

nn EthernetEthernet

nn HighHigh--Speed LANsSpeed LANs

–– FDDIFDDI

–– Fast EthernetFast Ethernet

–– Gigabit EthernetGigabit Ethernet

nn Wireless LANsWireless LANs

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 305: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

305

Midterm Review 10

Midterm Review 10

nn LAN interconnectionLAN interconnection

–– Interconnection schemes and devices.Interconnection schemes and devices.

–– Bridges.Bridges.

nn Routing with bridgesRouting with bridges

–– Fixed routing.Fixed routing.

–– Spanning tree.Spanning tree.

–– Source routing.Source routing.

nn RoutersRouters

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 306: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

306

Midterm Review 11

Midterm Review 11

nn Network layer.Network layer.

–– CircuitCircuit-- and packetand packet--switching.switching.

–– Services provided by network layer.Services provided by network layer.

–– Network layer structure.Network layer structure.

nn Routing.Routing.

–– Static.Static.

–– Dynamic.Dynamic.

–– Hierarchical routing.Hierarchical routing.

–– ManyMany--toto--many routing.many routing.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 307: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

307

Congestion ControlCongestion Control

nn Ideal network behavior:Ideal network behavior:

Packetsdelivered

Packetssent

Maximum capacity

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 308: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

308

Network CongestionNetwork Congestion

nn What is network congestion?What is network congestion?

–– Too many packets in the network.Too many packets in the network.

–– Router queues are always full.Router queues are always full.

»» Routers start dropping packets.Routers start dropping packets.

–– Congestion can fuel itself.Congestion can fuel itself.

»» Packet drops lead to retransmissions.Packet drops lead to retransmissions.

»» More traffic!More traffic!

–– May result in congestion collapse!May result in congestion collapse!

»»

Close to 0 throughput!

Close to 0 throughput!

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 309: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

309

InfiniteInfinite--Buffer RoutersBuffer Routers

nn Intuition says add more memory to routers Intuition says add more memory to routers and that’ll avoid congestion.and that’ll avoid congestion.

––

Nagle (1987) showed that infinite buffers

Nagle (1987) showed that infinite buffers actually make congestion worse.actually make congestion worse.

–– More packets More packets enqueuedenqueued for long time; they time for long time; they time out and are retransmitted; but still transmitted out and are retransmitted; but still transmitted by router.by router.

–– Therefore, more traffic.Therefore, more traffic.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 310: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

310

Causes of CongestionCauses of Congestion

nn Mismatch in capacity among different parts of Mismatch in capacity among different parts of the system.the system.–– Mismatch in link speeds.Mismatch in link speeds.

–– Mismatch in router processing capability.Mismatch in router processing capability.»» Table lookup and update.Table lookup and update.

»» Queue management.Queue management.

nn Congestion in one point of network tends to Congestion in one point of network tends to propagate backwards toward sender.propagate backwards toward sender.

R

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 311: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

311

Congestion versus Flow ControlCongestion versus Flow Control

nn Congestion control tries to ensure the Congestion control tries to ensure the network is able to carry offered traffic.network is able to carry offered traffic.

–– Involves hosts and intermediate routers.Involves hosts and intermediate routers.

nn Flow control ensures that the Flow control ensures that the communication endcommunication end--points are able to keep points are able to keep up with one another.up with one another.

–– Involves only the endInvolves only the end--points.points.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 312: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

312

Congestion and Flow ControlCongestion and Flow Control

nn Often mixed because tend to use same Often mixed because tend to use same feedback mechanisms.feedback mechanisms.

–– Example: “slow down” message received at Example: “slow down” message received at host may be caused by receiver not being able host may be caused by receiver not being able to keep up with sender host or by network not to keep up with sender host or by network not being able to handle additional traffic.being able to handle additional traffic.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 313: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

313

Congestion Control PrinciplesCongestion Control Principles

nn From control theory point of view:From control theory point of view:

–– Open and closed loop solutions.Open and closed loop solutions.

nn Open loop solutions:Open loop solutions:

–– Avoidance approach.Avoidance approach.

»» Tries to make sure problem doesn’t happen.Tries to make sure problem doesn’t happen.

»» Doesn’t take current network state into account.Doesn’t take current network state into account.

nn Closed loop solutions:Closed loop solutions:

–– Feedback loop.Feedback loop.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 314: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

314

Closed Loop SolutionsClosed Loop Solutions

nn

3 components:

3 components:

–– Monitoring.Monitoring.

–– Feedback generation.Feedback generation.

–– Operation adjustment.Operation adjustment.

nn Monitoring metrics:Monitoring metrics:

–– Packet loss.Packet loss.

–– Average queue length.Average queue length.

–– Number of retransmitted packets.Number of retransmitted packets.

–– Average packet delay.Average packet delay.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 315: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

315

FeedbackFeedback

nn Send information about the problem once it’s Send information about the problem once it’s detected.detected.–– Router that detects problem sends packet to traffic Router that detects problem sends packet to traffic

source(s).source(s).

–– SpecialSpecial--purpose bit in every packet that router sets purpose bit in every packet that router sets when it detects congestion above certain level to when it detects congestion above certain level to warn neighbors.warn neighbors.

–– Special probe messages to detect congested areas Special probe messages to detect congested areas so they can be avoided.so they can be avoided.

nn Stability: avoid oscillations.Stability: avoid oscillations.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 316: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

316

Congestion Control TaxonomyCongestion Control Taxonomy

nn Open loop algorithms:Open loop algorithms:

–– Act at source.Act at source.

–– Act at destination.Act at destination.

nn Closed loop algorithms:Closed loop algorithms:

–– Explicit feedback.Explicit feedback.

–– Implicit feedback.Implicit feedback.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 317: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

317

Open Loop ApproachesOpen Loop Approaches

nn Traffic ShapingTraffic Shaping–– Avoid traffic Avoid traffic burstinessburstiness by forcing packets to be by forcing packets to be

transmitted at more predictable rate.transmitted at more predictable rate.

–– Used in ATM networks.Used in ATM networks.

–– Regulates average transmission rate.Regulates average transmission rate.

–– In contrast to sliding window protocols which In contrast to sliding window protocols which regulate amount of data in transit.regulate amount of data in transit.

–– Service agreement between user and carrier.Service agreement between user and carrier.»» Important to realImportant to real--time traffic such as audio, video.time traffic such as audio, video.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 318: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

318

Leaky Bucket 1

Leaky Bucket 1

1. No matter the rate water entersbucket, the outflow is constant.

2. Once bucket full, water spills and lost.

Host

Network

Unregulatedflow

Regulated flow

Networkinterface

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 319: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

319

Leaky Bucket 2

Leaky Bucket 2

nn Equivalent to a singleEquivalent to a single--server queuing server queuing system with constant service time.system with constant service time.

nn Same size packets (e.g., ATM cells): use Same size packets (e.g., ATM cells): use packets as unit.packets as unit.

nn VariableVariable--sized packets: use sized packets: use numbrnumbr of bytes of bytes per clock tick.per clock tick.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 320: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

320

Token BucketToken Bucket

nn More flexible.More flexible.

nn Allows packets to go out as fast as they come Allows packets to go out as fast as they come in provided there are enough in provided there are enough tokenstokens..

nn Leaky bucket holds tokens generated every T Leaky bucket holds tokens generated every T sec.sec.

nn Allows hosts to save up for later.Allows hosts to save up for later.

–– Hosts can accumulate up to Hosts can accumulate up to nn tokens, when tokens, when nn is is bucket size.bucket size.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 321: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

321

Leaky and Token BucketLeaky and Token Bucket

nn Token bucket throws away tokens but never Token bucket throws away tokens but never packets.packets.

nn Can be used between host and network and Can be used between host and network and between routers.between routers.

nn Token bucket can still produce bursts.Token bucket can still produce bursts.

–– Insert leaky bucket after token bucket.Insert leaky bucket after token bucket.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 322: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

322

Flow SpecificationsFlow Specifications

nn Way for user/application to specify traffic patterns Way for user/application to specify traffic patterns and desired quality of service.and desired quality of service.

–– Before connection established or data is sent, source Before connection established or data is sent, source provides flow spec to network.provides flow spec to network.

–– Network can accept, reject, or counterNetwork can accept, reject, or counter--offer.offer.

nn

Example: flow spec language by Partridge (1992).

Example: flow spec language by Partridge (1992).

–– Traffic spec: maximum packet size, maximum Traffic spec: maximum packet size, maximum transmission rate.transmission rate.

–– Service desired: maximum acceptable loss rate, maximum Service desired: maximum acceptable loss rate, maximum delay and delay variation.delay and delay variation.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 323: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

323

Closed Loop ApproachesClosed Loop Approaches

nn Virtual circuit networks:Virtual circuit networks:

–– Admission control:Admission control:

»» Once congestion is detected, no more virtual circuits Once congestion is detected, no more virtual circuits are set up until problem is gone.are set up until problem is gone.

–– Avoid congested areas.Avoid congested areas.

–– Resource reservation based on service Resource reservation based on service agreement.agreement.

»» Resources include space (table, buffer) in routers, Resources include space (table, buffer) in routers, link bandwidth.link bandwidth.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 324: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

324

Choke Packets 1

Choke Packets 1

nn Closed loop approach.Closed loop approach.

nn Can be used in both VC and DG networks.Can be used in both VC and DG networks.

nn Main idea:Main idea:

–– Routers detect congestion.Routers detect congestion.

»» Example: routers measure utilization of its output lines; if it Example: routers measure utilization of its output lines; if it goes goes above threshold, congestion warning.above threshold, congestion warning.

»» New packet using line in warning state will be forwarded normallNew packet using line in warning state will be forwarded normally y (tagged for no more choke packets), but generates choke packet (tagged for no more choke packets), but generates choke packet back to source with destination.back to source with destination.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 325: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

325

Choke Packets 2

Choke Packets 2

nn Hosts receiving choke packets:Hosts receiving choke packets:

–– Decrease their traffic to the problematic Decrease their traffic to the problematic destination.destination.

–– Ignore other choke packets for the same Ignore other choke packets for the same destination for some period of time.destination for some period of time.

–– After that period, if more choke packets for same After that period, if more choke packets for same destination, reduce traffic even more, etc.destination, reduce traffic even more, etc.

nn Reducing traffic:Reducing traffic:

–– Adjust window size, leaky bucket rate, etc.Adjust window size, leaky bucket rate, etc.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 326: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

326

HopHop--byby--Hop Choke PacketsHop Choke Packets

nn Goal is to provide quick relief at congestion Goal is to provide quick relief at congestion point.point.

nn Choke packet takes effect at every hop it Choke packet takes effect at every hop it passes through.passes through.

nn Intermediate nodes reduce traffic on Intermediate nodes reduce traffic on corresponding output line.corresponding output line.

–– More buffers since input traffic stays the same More buffers since input traffic stays the same until choke packet reaches previous hop.until choke packet reaches previous hop.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 327: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

327

Fair Queuing Fair Queuing

nn Problem with choke packets:Problem with choke packets:

–– Route sends signal, but it’s up to host to react.Route sends signal, but it’s up to host to react.

–– WellWell--behaved hosts loose!behaved hosts loose!

nn Fair queuing makes compliance attractive.Fair queuing makes compliance attractive.

–– Routers have multiple queues per output line.Routers have multiple queues per output line.

–– One queue per source.One queue per source.

–– Router scans queues in round robin, transmitting Router scans queues in round robin, transmitting first packet on next queue. first packet on next queue.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 328: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

328

Weighted Fair QueuingWeighted Fair Queuing

nn Enable different priorities.Enable different priorities.

nn Different queues may have different Different queues may have different priorities.priorities.

nn Handle various types of traffic differently.Handle various types of traffic differently.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 329: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

329

Load Shedding 1

Load Shedding 1

nn If everything else fails, routers simply drop packets.If everything else fails, routers simply drop packets.

nn Choosing packets to drop:Choosing packets to drop:

–– Randomly.Randomly.

–– Some packets are worth more than others.Some packets are worth more than others.

»» Application dependentApplication dependent

nn Data distribution: old packets more important than new.Data distribution: old packets more important than new.

nn RealReal--time applications: new more important than old.time applications: new more important than old.

–– Applications need to mark packets with their priorityApplications need to mark packets with their priority

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 330: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

330

Load Shedding 2

Load Shedding 2

nn Marking packets required special bits in Marking packets required special bits in packet header.packet header.

nn

ATM cells have 1 bit in the header reserved

ATM cells have 1 bit in the header reserved for this purpose.for this purpose.

nn When routers sense some congestion build When routers sense some congestion build up, better to start dropping packets early up, better to start dropping packets early rather than waiting until it becomes rather than waiting until it becomes completely swamped.completely swamped.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 331: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

331

InternetworkingInternetworking

nn

Interconnection of 2 or more networks

Interconnection of 2 or more networks forming an forming an internetworkinternetwork, or internet., or internet.

–– LANs, LANs, MANsMANs, and WANs., and WANs.

nn Different networks man different protocols.Different networks man different protocols.

–– TCP/IP, IBM’s SNA, DEC’s TCP/IP, IBM’s SNA, DEC’s DECnetDECnet, ATM, , ATM, Novell and AppleTalk (for LANs).Novell and AppleTalk (for LANs).

–– Also, satellite and cellular networks.Also, satellite and cellular networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 332: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

332

Example InternetExample Internet

B R

X.25 WAN R

R

SNA WAN

802.5LAN

R802.3LAN

802.4LAN

802.3LAN

LAN-LANLAN-WAN

LAN-WAN-LAN

Gateway: device connecting 2 ormore different networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 333: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

333

GatewaysGateways

nn Repeaters: operate at physical layer (bits); Repeaters: operate at physical layer (bits); amplify/regenerate signal.amplify/regenerate signal.

nn Bridges: storeBridges: store--andand--forward frames; data link layer forward frames; data link layer devices.devices.

nn Routers: operate at network layer.Routers: operate at network layer.

nn Transport gateways: connect networks at the Transport gateways: connect networks at the transport layer.transport layer.

nn

Application gateways: connect 2 parts of an

Application gateways: connect 2 parts of an application at application layer.application at application layer.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 334: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

334

HalfHalf--GatewaysGateways

nn Gateway is split in two: each half owned Gateway is split in two: each half owned and operated by one of the network and operated by one of the network providers.providers.

nn

Common protocol between the 2 halves.

Common protocol between the 2 halves.

N2

Half-gateway

N1

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 335: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

335

How do networks differ?How do networks differ?

nn Service offered: connectionService offered: connection--oriented versus connectionoriented versus connection--less.less.

nn Protocols: IP, IPX, AppleTalk, Protocols: IP, IPX, AppleTalk, DECnetDECnet..

nn

Addressing: flat (802) versus hierarchical (IP).

Addressing: flat (802) versus hierarchical (IP).

nn Maximum packet size.Maximum packet size.

nn Quality of service.Quality of service.

nn Error control: reliable, ordered, unordered delivery.Error control: reliable, ordered, unordered delivery.

nn Flow control: sliding window versus rateFlow control: sliding window versus rate--based.based.

nn Congestion control: leaky bucket, choke packets.Congestion control: leaky bucket, choke packets.

nn Security: privacy rules, encryption.Security: privacy rules, encryption.

nn Parameters: different timeouts.Parameters: different timeouts.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 336: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

336

Types of Types of InternetworksInternetworks

nn ConnectionConnection--oriented concatenation of VC oriented concatenation of VC subnets.subnets.–– VC between source and router closest to destination VC between source and router closest to destination

network. network.

–– Router builds V to gateway to other subnet.Router builds V to gateway to other subnet.

–– Gateway keeps state about that VC.Gateway keeps state about that VC.

–– Builds VC to router in the next subnet, etc.Builds VC to router in the next subnet, etc.

nn Every packet traverses same path.Every packet traverses same path.–– Ordered delivery.Ordered delivery.

–– Routers convert between packet formats.Routers convert between packet formats.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 337: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

337

ConnectionConnection--oriented oriented concatenationconcatenation

nn VC between source and router closest to VC between source and router closest to destination network. destination network.

nn Router builds VC to gateway to other Router builds VC to gateway to other subnet. Gateway keeps state about VC.subnet. Gateway keeps state about VC.

nn Gateway builds VC to router in the next Gateway builds VC to router in the next subnet, etc.subnet, etc.

nn Every packet traverses same path.Every packet traverses same path.–– Ordered delivery.Ordered delivery.

–– Routers convert between packet formats.Routers convert between packet formats.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 338: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

338

Connectionless InternetworkingConnectionless Internetworking

nn Datagram model.Datagram model.

–– Different packets may take different routes.Different packets may take different routes.

–– Separate routing decision for each packet.Separate routing decision for each packet.

–– No ordered delivery guarantees.No ordered delivery guarantees.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 339: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

339

Datagram versus VC InternetsDatagram versus VC Internets

nn VC:VC:–– Plus’s: resources reserved in advance, ordered Plus’s: resources reserved in advance, ordered

delivery, short headers.delivery, short headers.

–– Minus’s: vulnerability to failures, less adaptive, Minus’s: vulnerability to failures, less adaptive, hard if involving datagram subnet.hard if involving datagram subnet.

nn Datagram:Datagram:–– Plus’s: more robust and adaptive, can be used over Plus’s: more robust and adaptive, can be used over

datagram subnets (many LANs, mobile networks).datagram subnets (many LANs, mobile networks).

–– Minus’s: Longer headers, unordered delivery.Minus’s: Longer headers, unordered delivery.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 340: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

340

TunnelingTunneling

nn Interconnecting through a “foreign” subnet.Interconnecting through a “foreign” subnet.

G G

WAN

Ethernet 1

Ethernet 2Tunnel

IP

Ethernet frame

IP

Ethernet frameIP

IP packet insidepayload field ofWAN packet.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 341: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

341

InternetworkInternetwork

Routing 1

Routing 1

nn 22--level hierarchy:level hierarchy:

–– Routing within each network: interior gateway protocol.Routing within each network: interior gateway protocol.

–– Routing between networks: exterior gateway protocol.Routing between networks: exterior gateway protocol.

nn Within each network, different routing algorithms Within each network, different routing algorithms can be used.can be used.

nn Each network is autonomously managed and Each network is autonomously managed and independent of others: autonomous system (AS).independent of others: autonomous system (AS).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 342: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

342

InternetworkInternetwork

Routing 2

Routing 2

nn Typically, packet starts in its LAN. Typically, packet starts in its LAN. Gateway receives it (broadcast on LAN to Gateway receives it (broadcast on LAN to “unknown” destination).“unknown” destination).

nn Gateway sends packet to gateway on the Gateway sends packet to gateway on the destination network using its routing table. destination network using its routing table. If it can use the packet’s native protocol, If it can use the packet’s native protocol, sends packet directly. Otherwise, tunnels it.sends packet directly. Otherwise, tunnels it.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 343: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

343

Fragmentation 1

Fragmentation 1

nn NetworkNetwork--specific maximum packet size.specific maximum packet size.

–– Width of TDM slot.Width of TDM slot.

–– OS buffer limitations.OS buffer limitations.

–– Protocol (number of bits in packet length field).Protocol (number of bits in packet length field).

nn

Maximum payloads range from 48 bytes

Maximum payloads range from 48 bytes

(ATM cells) to 64Kbytes (IP packets).

(ATM cells) to 64Kbytes (IP packets).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 344: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

344

Fragmentation 2

Fragmentation 2

nn What happens when large packet wants to travel What happens when large packet wants to travel through network with smaller maximum packet size? through network with smaller maximum packet size? FragmentationFragmentation..

nn Gateways break packets into Gateways break packets into fragmentsfragments; each sent as ; each sent as separate packet.separate packet.

nn Gateway on the other side have to reassemble Gateway on the other side have to reassemble fragments into original packet.fragments into original packet.

nn

2 kinds of fragmentation: transparent and non

2 kinds of fragmentation: transparent and non--transparent.transparent.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 345: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

345

Transparent Fragmentation Transparent Fragmentation

nn SmallSmall--packet network transparent to other subsequent packet network transparent to other subsequent networks.networks.

nn Fragments of a packet addressed to the same exit Fragments of a packet addressed to the same exit gateway, where packet is reassembled.gateway, where packet is reassembled.–– OK for concatenated VC internetworking.OK for concatenated VC internetworking.

nn Subsequent networks are not aware fragmentation Subsequent networks are not aware fragmentation occurred.occurred.

nn ATM networks (through special hardware) provide ATM networks (through special hardware) provide transparent fragmentation: segmentation.transparent fragmentation: segmentation.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 346: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

346

Problems with Transparent Problems with Transparent Fragmentation Fragmentation

nn Exit gateway must know when it received all Exit gateway must know when it received all the pieces.the pieces.–– Fragment counter or “end of packet” bit.Fragment counter or “end of packet” bit.

nn Some performance penalty but requiring all Some performance penalty but requiring all fragments to go through same gateway.fragments to go through same gateway.

nn May have to repeatedly fragment and May have to repeatedly fragment and reassemble through series of smallreassemble through series of small--packet packet networks.networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 347: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

347

NonNon--Transparent FragmentationTransparent Fragmentation

nn Only reassemble at destination host.Only reassemble at destination host.

–– Each fragment becomes a separate packet.Each fragment becomes a separate packet.

–– Thus routed independently.Thus routed independently.

nn Problems:Problems:

–– Hosts must reassemble.Hosts must reassemble.

–– Every fragment must carry header until it Every fragment must carry header until it reaches destination host.reaches destination host.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 348: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

348

Keeping Track of Fragments 1

Keeping Track of Fragments 1

nn Fragments must be numbered so that original Fragments must be numbered so that original data stream can be reconstructed.data stream can be reconstructed.

nn TreeTree--structured numbering scheme:structured numbering scheme:––

Packet 0 generates fragments 0.0, 0.1, 0.2, …

Packet 0 generates fragments 0.0, 0.1, 0.2, …

–– If these fragments need to be fragmented later on, then If these fragments need to be fragmented later on, then

0.0.0, 0.0.1, …, 0.1.0, 0.1.1, …

0.0.0, 0.0.1, …, 0.1.0, 0.1.1, …

–– But, too much overhead in terms of number of fields But, too much overhead in terms of number of fields needed.needed.

–– Also, if fragments are lost, retransmissions can take Also, if fragments are lost, retransmissions can take alternate routes and get fragmented differently.alternate routes and get fragmented differently.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 349: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

349

Keeping Track of Fragments 2

Keeping Track of Fragments 2

nn Another way is to define elementary fragment Another way is to define elementary fragment size that can pass through every network.size that can pass through every network.

nn When packet fragmented, all pieces equal to When packet fragmented, all pieces equal to elementary fragment size, except last one elementary fragment size, except last one (may be smaller).(may be smaller).

nn Packet may contain several fragments.Packet may contain several fragments.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 350: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

350

Keeping Track of Fragments 3

Keeping Track of Fragments 3

nn Header contains packet number, number of first Header contains packet number, number of first fragment in the packet, and lastfragment in the packet, and last--fragment bit.fragment bit.

27 0 1 A B C D E F G H I J

27 0 0 A B C D E F G H

27 8 1 I J

Packet numberNumber offirst fragment

Last-fragment bit

(a) Original packet

with 10 data bytes.

(b) Fragments after passing through network

with maximum packet size = 8 bytes.

1 byte

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 351: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

351

Firewalls 1

Firewalls 1

nn Analogy: ditch around medieval castles.Analogy: ditch around medieval castles.

–– To enter or exit castle, must pass over single bridge.To enter or exit castle, must pass over single bridge.

nn Firewalls force traffic to and from company through Firewalls force traffic to and from company through single point.single point.

nn Firewalls typically consist of:Firewalls typically consist of:

–– Packet filters (one for incoming, other for outgoing Packet filters (one for incoming, other for outgoing packets).packets).

–– Application gateway.Application gateway.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 352: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

352

Firewalls 2

Firewalls 2

nn Packet filter: router Packet filter: router equipped with capability of equipped with capability of inspecting packets.inspecting packets.

–– Packets that meet criteria are Packets that meet criteria are forwarded; others discarded.forwarded; others discarded.

nn Application gateways Application gateways operate at application level; operate at application level; e.g., mail gateway.e.g., mail gateway.

Applicationgateway

Corporate network

Outsideworld

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 353: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

353

The Internet Network LayerThe Internet Network Layer

nn The Internet as a collection on networks or The Internet as a collection on networks or autonomous systems (autonomous systems (ASsASs).).

nn Hierarchical structure.Hierarchical structure.

USbackbone

Europeanbackbone

Regionalnetwork

National network

Transcontinentallinks

Transcontinentallinks

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 354: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

354

IP (Internet Protocol)IP (Internet Protocol)

nn Glues Internet together.Glues Internet together.

nn Common networkCommon network--layer protocol spoken by all layer protocol spoken by all Internet participating networks.Internet participating networks.

nn Best effort datagram service:Best effort datagram service:

–– No reliability guarantees.No reliability guarantees.

–– No ordering guarantees.No ordering guarantees.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 355: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

355

IPIP

nn Transport layer breaks data streams into Transport layer breaks data streams into datagramsdatagrams; fragments transmitted over ; fragments transmitted over Internet, possibly being fragmented.Internet, possibly being fragmented.

nn When all packet fragments arrive at When all packet fragments arrive at destination, reassembled by network layer destination, reassembled by network layer and delivered to transport layer at and delivered to transport layer at destination host.destination host.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 356: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

356

IP VersionsIP Versions

nn

IPv4: IP version 4.

IPv4: IP version 4.

–– Current, predominant version.Current, predominant version.

–– 3232--bit long addresses.bit long addresses.

nn

IPv6: IP version 6 (

IPv6: IP version 6 (akaaka, , IPngIPng).).

––

Evolution of IPv4.

Evolution of IPv4.

––

Longer addresses (16

Longer addresses (16--byte long).byte long).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 357: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

357

IP Datagram FormatIP Datagram Format

nn IP datagram consists of header and data (or IP datagram consists of header and data (or payload).payload).

nn Header:Header:

–– 2020--byte fixed (mandatory) part.byte fixed (mandatory) part.

–– Variable length optional part.Variable length optional part.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 358: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

358

IP HeaderIP Header

32 bits

Version Headerlength

Type ofservice Total length

Identification Fragment offsetD M

TTL Protocol Header checksum

Source address

Destination address

Options

U

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 359: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

359

IP Header Fields 1

IP Header Fields 1

nn Version: which IP version datagram uses.Version: which IP version datagram uses.

nn

Header length: how long (in 32

Header length: how long (in 32--bit words) is header; bit words) is header;

minimum=5; maximum=15 (options=40 bytes).

minimum=5; maximum=15 (options=40 bytes).

nn

Type of service: precedence (priority), 3 flags (delay,

Type of service: precedence (priority), 3 flags (delay, throughput, reliability). In practice, routers ignore throughput, reliability). In practice, routers ignore type of service.type of service.

nn Total length: length of total datagram, i.e., header + Total length: length of total datagram, i.e., header +

data (max = 64Kbytes).

data (max = 64Kbytes).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 360: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

360

IP Header Fields 2

IP Header Fields 2

nn Identification: which datagram fragment Identification: which datagram fragment belongs to.belongs to.

nn U: unused bit.U: unused bit.

nn D: don’t fragment.D: don’t fragment.

nn M: more fragments.M: more fragments.

nn Fragment offset: position of fragment in Fragment offset: position of fragment in datagram.datagram.

nn TTL: datagram lifetime.TTL: datagram lifetime.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 361: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

361

IP Header Fields 3

IP Header Fields 3

nn Protocol: number of the transport protocol Protocol: number of the transport protocol that generated the datagram.that generated the datagram.

nn Header checksum: verifies header integrity; Header checksum: verifies header integrity; computed at each hop.computed at each hop.

nn Source and destination address: IP Source and destination address: IP addresses of source and destination.addresses of source and destination.

nn Options: way of extending the protocol. Options: way of extending the protocol.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 362: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

362

AddressingAddressing

nn Required for packet delivery.Required for packet delivery.

–– Each network may use different addressing Each network may use different addressing scheme.scheme.

–– Addresses must be unique.Addresses must be unique.

nn Flat addresses: physical addresses (e.g., Flat addresses: physical addresses (e.g., Ethernet address).Ethernet address).

nn Hierarchical addresses: use hierarchy Hierarchical addresses: use hierarchy scheme like postal addresses (e.g., IP).scheme like postal addresses (e.g., IP).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 363: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

363

Address TypesAddress Types

nn UnicastUnicast: uniquely distinguishes a single : uniquely distinguishes a single node.node.

nn Multicast: shared by a group of nodes.Multicast: shared by a group of nodes.

nn Broadcast: shared by all nodes.Broadcast: shared by all nodes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 364: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

364

IP AddressesIP Addresses

nn Every host and router on the Internet must Every host and router on the Internet must have an IP address.have an IP address.

nn 22--level hierarchy:level hierarchy:–– Network number.Network number.

–– Host number.Host number.

nn Notations:Notations:–– Binary: Binary:

10000000 00000110 11110000 00000011

10000000 00000110 11110000 00000011

––

Dotted decimal: 128.6.240.3

Dotted decimal: 128.6.240.3

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 365: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

365

IP Address Formats 1

IP Address Formats 1

nn

4 different classes:

4 different classes:

0XXXXXXX

Network Host

10XXXXXX XXXXXXXX

110XXXXX XXXXXXXX XXXXXXXX

1110XXXX XXXXXXXX XXXXXXXX XXXXXXXX

Class A:

128 nets.

16M hosts/net.Class B:

16K nets.

64K hosts/net.Class C:

2M nets.

256 hosts/net.Class D:Multicast.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 366: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

366

IP Address Formats 2

IP Address Formats 2

nn

Class A: 1~127.

Class A: 1~127.

nn

Class B: 128~191.

Class B: 128~191.

nn

Class C: 192~223.

Class C: 192~223.

nn

Class D: 224~239.

Class D: 224~239.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 367: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

367

MultiMulti--addressesaddresses

nn A router usually has more than one IP A router usually has more than one IP address.address.

nn MultiMulti--homed host: host with multiple homed host: host with multiple network interfaces each of which has network interfaces each of which has different IP address.different IP address.

80.0.0.0

236.240.128.0129.98.0.0

129.98.95.1236.240.128.3

80.0.0.8

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 368: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

368

Management and Scalability 1

Management and Scalability 1

nn Network numbers assigned by single Network numbers assigned by single authority: NIC (network information authority: NIC (network information center).center).

nn All hosts in a network must have same All hosts in a network must have same network number.network number.

nn What if networks grow?What if networks grow?

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 369: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

369

Management and Scalability 2

Management and Scalability 2

nn

Example: company starts with 1 class C

Example: company starts with 1 class C

LAN, thus can connect up to 256 hosts.

LAN, thus can connect up to 256 hosts.

––

It might grow to more than 256 hosts.

It might grow to more than 256 hosts.

–– It might get more LANs.It might get more LANs.

–– For every new LAN, need new network number For every new LAN, need new network number from NIC.from NIC.

–– Moving machines between LANs needs address Moving machines between LANs needs address change.change.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 370: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

370

SubnettingSubnetting 11

nn Split address space into several “internal” Split address space into several “internal” subnets.subnets.

–– Still act like single network to outside world.Still act like single network to outside world.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 371: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

371

SubnettingSubnetting 22nn Routing: hierarchical.Routing: hierarchical.

–– (network, (network, --) entries: distant networks hosts.) entries: distant networks hosts.

–– (this network, host) entries: local hosts.(this network, host) entries: local hosts.

–– Routers only need to keep track of other networks and Routers only need to keep track of other networks and local hosts.local hosts.

nn With With subnettingsubnetting::–– (network, (network, --) entries: distant networks hosts.) entries: distant networks hosts.

–– (this network, subnet, (this network, subnet, --).).

–– (this network, this subnet, host).(this network, this subnet, host).

–– Adds extra hierarchical levelAdds extra hierarchical level

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 372: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

372

Subnet MaskSubnet Mask

nn Used to compute the subnet number; i.e., gets Used to compute the subnet number; i.e., gets rid of the host number.rid of the host number.

–– Facilitates routing table lookFacilitates routing table look--up.up.

–– IP address AND subnet mask = subnet #IP address AND subnet mask = subnet #

nn Example:Example:

10XXXXXX XXXXXXXX SSSSSSHH HHHHHHHH

11111111 11111111 11111100 00000000

Ex: 130.50.15.6 AND subnet mask = 130.50.12.0

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 373: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

373

Internet Control ProtocolsInternet Control Protocols

nn IP carries data.IP carries data.

nn There are other network layer protocols that There are other network layer protocols that carry control information.carry control information.

nn Example: ICMPExample: ICMP

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 374: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

374

ICMPICMP

nn Internet Control Message Protocol.Internet Control Message Protocol.

nn Report specific events.Report specific events.

–– Generated by routers.Generated by routers.

–– Encapsulated in IP packets.Encapsulated in IP packets.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 375: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

375

ICMP MessagesICMP Messages

Destination unreachable Packet couldn’t be deliveredTime exceeded

TTL field hit 0Parameter problem Invalid header fieldSource quench Choke packetsRedirect Route problemEcho request Check if destination is upEcho reply Destination respondsTimestamp request Same as echo request + TSTimestamp reply Same as echo reply + TS

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 376: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

376

Mapping IP to DLL AddressMapping IP to DLL Address

nn Internet applications refer to hosts by their IP Internet applications refer to hosts by their IP addresses; once packet gets to destination addresses; once packet gets to destination LAN, node needs to figure out the destination LAN, node needs to figure out the destination address.address.

nn One solution is to have configuration file.One solution is to have configuration file.

–– Hard to maintain/update.Hard to maintain/update.

nn Address Resolution Protocol (ARP):Address Resolution Protocol (ARP):

–– Run by every node to map IP to DLL address Run by every node to map IP to DLL address

(RFC 826).

(RFC 826).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 377: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

377

ARPARP

nn Advantage: Advantage:

–– Easy to administer, less human intervention.Easy to administer, less human intervention.

––

Example: 2 hosts on the same Ethernet want to

Example: 2 hosts on the same Ethernet want to communicate.communicate.

»»

Host 1 must figure out host 2’s Ethernet address.

Host 1 must figure out host 2’s Ethernet address.

»»

Host 1 broadcasts ARP packet on Ethernet asking for

Host 1 broadcasts ARP packet on Ethernet asking for

the Ethernet address of host 2.

the Ethernet address of host 2.

»»

Host 2 receives the ARP request, and replies with its

Host 2 receives the ARP request, and replies with its Ethernet address.Ethernet address.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 378: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

378

ARP OptimizationsARP Optimizations

nn Caching of ARP replies.Caching of ARP replies.

–– Entries may have large Entries may have large TTLsTTLs..

nn When sending ARP request, piggyback its When sending ARP request, piggyback its own IPown IP--DLL address mapping.DLL address mapping.

nn Every machine broadcasts its mapping at Every machine broadcasts its mapping at boot time.boot time.

–– No response is expected.No response is expected.

–– Other machines cache that information.Other machines cache that information.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 379: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

379

Proxy ARPProxy ARP

nn

What if host 1 wants to send data to host 3

What if host 1 wants to send data to host 3 on a different LAN?on a different LAN?

––

Router connecting the 2 LANs can be

Router connecting the 2 LANs can be configured to respond to ARP requests for the configured to respond to ARP requests for the networks it interconnects: proxy networks it interconnects: proxy arparp..

––

Another solution is for host 1 to recognize host

Another solution is for host 1 to recognize host

3 is on remote network and use default LAN

3 is on remote network and use default LAN address that handles all remote traffic; that address that handles all remote traffic; that could be the router’s Ethernet address. could be the router’s Ethernet address.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 380: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

380

RARPRARP

nn Reverse Address Resolution Protocol.Reverse Address Resolution Protocol.

nn Given LAN address, what’s the IP address?Given LAN address, what’s the IP address?

nn Usually for booting diskless workstation.Usually for booting diskless workstation.–– Gets the OS image from remote file server.Gets the OS image from remote file server.

–– Same image for all machines.Same image for all machines.

–– Machine broadcasts its LAN address.Machine broadcasts its LAN address.

–– Remote RARP server responds with machine’s IP Remote RARP server responds with machine’s IP address.address.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 381: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

381

BOOTPBOOTP

nn RARP broadcasts are not forwarded by RARP broadcasts are not forwarded by routers. routers.

nn Need RARP server on every network.Need RARP server on every network.

nn BOOTP uses UDP messages that are BOOTP uses UDP messages that are forwarded by routers.forwarded by routers.

–– Also provides additional information such as IP Also provides additional information such as IP address of file server holding OS image, subnet address of file server holding OS image, subnet mask, etc.mask, etc.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 382: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

382

Internet RoutingInternet Routing

nn IGPsIGPs and and EGPsEGPs

–– IGPsIGPs: routing within : routing within ASsASs..

–– EGPsEGPs: routing between : routing between ASsASs..

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 383: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

383

IGPsIGPs

nn Original Internet IGP was RIP.Original Internet IGP was RIP.

–– Distance vector.Distance vector.

–– OK for small OK for small ASsASs but not efficient as but not efficient as ASsASs got larger. got larger.

nn New IGP: OSPF.New IGP: OSPF.

–– Open Shortest Path First.Open Shortest Path First.

––

Became standard in 1990.

Became standard in 1990.

–– Link state algorithm.Link state algorithm.

–– RIP is still running but OSPF is taking over.RIP is still running but OSPF is taking over.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 384: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

384

OSPF 1

OSPF 1

nn Design requirements:Design requirements:

–– Open implementation.Open implementation.

–– Support for various distance metrics: delay, hops, etc.Support for various distance metrics: delay, hops, etc.

–– Dynamic: automatically adapt to topology changes.Dynamic: automatically adapt to topology changes.

–– QoSQoS Routing: realRouting: real--time versus other traffic using IP’s type time versus other traffic using IP’s type of service field.of service field.

–– Load balancing across multiple lines.Load balancing across multiple lines.

–– Security and tunneling.Security and tunneling.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 385: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

385

OSPF 2

OSPF 2

nn Abstracts collection of networks, routers and Abstracts collection of networks, routers and lines into a directed graph where edges are lines into a directed graph where edges are assigned a cost proportional to the routing assigned a cost proportional to the routing metric.metric.

nn It then computes shortest path.It then computes shortest path.

nn Hierarchical routing within Hierarchical routing within ASsASs..–– Areas: collection of contiguous networks.Areas: collection of contiguous networks.

––

Area 0: AS backbone; all areas connected to it.

Area 0: AS backbone; all areas connected to it.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 386: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

386

OSPF 3

OSPF 3

nn Type of service routing:Type of service routing:

–– Uses different graphs labeled with different Uses different graphs labeled with different metrics.metrics.

nn Routing updates:Routing updates:

–– Adjacent routersAdjacent routers exchange routing information.exchange routing information.

–– Adjacent routers are on different LANs.Adjacent routers are on different LANs.

–– Reliable link state updates with sequence #’s.Reliable link state updates with sequence #’s.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 387: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

387

EGPsEGPs

nn Routing protocol between Routing protocol between ASsASs..

nn Take policy into account.Take policy into account.

–– An AS may not be willing to carry traffic An AS may not be willing to carry traffic originating and destined to foreign originating and destined to foreign ASsASs..

–– Example: phone companies are willing to carry Example: phone companies are willing to carry traffic for their customers but not for others.traffic for their customers but not for others.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 388: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

388

Routing Policy ExamplesRouting Policy Examples

nn No transit traffic through certain No transit traffic through certain ASsASs..

nn Traffic source restricts Traffic source restricts ASsASs through which through which its traffic crosses.its traffic crosses.

nn Same for destination.Same for destination.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 389: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

389

BGP 1

BGP 1

nn Border Gateway Protocol.Border Gateway Protocol.

nn Policies are manually configured into BGP Policies are manually configured into BGP routers.routers.

nn BGP abstracts networks as a collection of BGP abstracts networks as a collection of BGP routers and the their links.BGP routers and the their links.

nn

2 BGP routers are connected if they share a

2 BGP routers are connected if they share a common network.common network.

nn BGP routers communicate reliably using TCP.BGP routers communicate reliably using TCP.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 390: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

390

BGP 2

BGP 2

nn

3 types of networks:

3 types of networks:

–– Stub networks: have a single connection in the Stub networks: have a single connection in the BGP graph; cannot carry transit traffic.BGP graph; cannot carry transit traffic.

–– MultiMulti--connected networks: have multiple connected networks: have multiple connections but refuse to carry transit traffic.connections but refuse to carry transit traffic.

––

Transit networks: agree to carry transit (3rd.

Transit networks: agree to carry transit (3rd. party) traffic possibly with some restriction; party) traffic possibly with some restriction; e.g., backbones. e.g., backbones.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 391: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

391

BGP 3

BGP 3

nn BGP is a distance vector protocol.BGP is a distance vector protocol.

nn Routing table entries keep whole path to Routing table entries keep whole path to destination + distance.destination + distance.

nn BGP routers can discard the paths containing BGP routers can discard the paths containing itself: avoiding loops and counting to infinity.itself: avoiding loops and counting to infinity.

nn Routers compute distance associated to a route Routers compute distance associated to a route taking policy into account.taking policy into account.–– If policy is violated, distance = infinity.If policy is violated, distance = infinity.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 392: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

392

Internet MulticastingInternet Multicasting

nn IP supports multicasting using class D IP supports multicasting using class D addresses.addresses.

–– Each class D address identifies a group of Each class D address identifies a group of hosts.hosts.

––

28 bits define over 250 million groups.

28 bits define over 250 million groups.

nn BestBest--effort delivery.effort delivery.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 393: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

393

Group MembershipGroup Membership

nn Hosts (single or multiple processes) may join Hosts (single or multiple processes) may join and leave group.and leave group.

nn Special, multicast routers perform multicast Special, multicast routers perform multicast routing and packet forwarding.routing and packet forwarding.–– Hosts belonging to multicast groups periodically Hosts belonging to multicast groups periodically

send messages to the closest multicast router.send messages to the closest multicast router.

–– Multicast routers and hosts use IGMP (Internet Multicast routers and hosts use IGMP (Internet Group Management Protocol) to exchange Group Management Protocol) to exchange membership information.membership information.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 394: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

394

IP Multicast RoutingIP Multicast Routing

nn Use spanning trees.Use spanning trees.

nn Modified distance vector protocol using Modified distance vector protocol using unicastunicast routing information.routing information.–– Build one spanning tree per source, per group.Build one spanning tree per source, per group.

–– Or, one shared spanning tree per group.Or, one shared spanning tree per group.

–– Use pruning to remove parts of the tree that don’t Use pruning to remove parts of the tree that don’t have any multicast group members.have any multicast group members.

–– Use tunneling to cross regions that are not Use tunneling to cross regions that are not multicast capable.multicast capable.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 395: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

395

Mobile IP 1

Mobile IP 1

nn Support for mobile users.Support for mobile users.–– “Last hop” mobility.“Last hop” mobility.

nn Problem: IP addressing scheme.Problem: IP addressing scheme.–– Class+network number+host number.Class+network number+host number.

–– If host moves and attaches itself to foreign If host moves and attaches itself to foreign network, packets destined to it will still go to its network, packets destined to it will still go to its home network.home network.

–– Assigning hosts new IP address?Assigning hosts new IP address?»» Too much hassle.Too much hassle.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 396: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

396

Mobile IP 2

Mobile IP 2

nn Solution:Solution:

–– Home agent: runs at the home network.Home agent: runs at the home network.

–– Foreign agent: runs at foreign network.Foreign agent: runs at foreign network.

–– When mobile host connects itself to foreign When mobile host connects itself to foreign network, registers with foreign network’s network, registers with foreign network’s foreign agent.foreign agent.

–– Foreign agent assigns host Foreign agent assigns host carecare--of addressof address, and , and informs home agent.informs home agent.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 397: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

397

Mobile IP 3

Mobile IP 3

nn Sending packets: mobile host uses its careSending packets: mobile host uses its care--of of address.address.

nn Receiving packets: Receiving packets: –– When packet arrives at home network, router that gets it When packet arrives at home network, router that gets it

sends ARP request for that IP address.sends ARP request for that IP address.

–– Home agent replies with its own Ethernet address. It gets Home agent replies with its own Ethernet address. It gets the packet, and tunnels it to foreign agent. Foreign agent the packet, and tunnels it to foreign agent. Foreign agent delivers packet to mobile host.delivers packet to mobile host.

–– Home agent sends careHome agent sends care--of address to sender, so future of address to sender, so future packets are sent directly to foreign network.packets are sent directly to foreign network.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 398: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

398

Mobile IP 4

Mobile IP 4

nn Locating foreign agents:Locating foreign agents:–– Foreign agents periodically broadcast their address and Foreign agents periodically broadcast their address and

service provided (e.g., home, foreign, or both).service provided (e.g., home, foreign, or both).

–– Mobile host can announce its presence and wait for Mobile host can announce its presence and wait for response from foreign agent.response from foreign agent.

nn UnregistrationUnregistration::–– If host leaves without If host leaves without unregisteringunregistering, its registration expires , its registration expires

after some time.after some time.

nn Security:Security:–– Authentication issues.Authentication issues.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 399: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

399

Scaling IP Addresses 1

Scaling IP Addresses 1

nn Exponential growth of the Internet!Exponential growth of the Internet!

–– 3232--bit address fields are getting too small.bit address fields are getting too small.

–– Early predictions: it’d take decades to achieve Early predictions: it’d take decades to achieve

100,000 network mark.

100,000 network mark.

––

100,000th. network was connected in 1996!

100,000th. network was connected in 1996!

–– Internet is rapidly running out of IP addresses!Internet is rapidly running out of IP addresses!

–– Waste due to hierarchical address. Waste due to hierarchical address.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 400: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

400

IP Address Formats IP Address Formats

nn

4 different classes:

4 different classes:

0XXXXXXX

Network Host

10XXXXXX XXXXXXXX

110XXXXX XXXXXXXX XXXXXXXX

1110XXXX XXXXXXXX XXXXXXXX XXXXXXXX

Class A:

128 nets.

16M hosts/net.Class B:

16K nets.

64K hosts/net.Class C:

2M nets.

256 hosts/net.Class D:Multicast.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 401: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

401

Scaling IP Addresses 2

Scaling IP Addresses 2

nn

Class A addresses: 16M hosts is usually too

Class A addresses: 16M hosts is usually too much.much.

nn

Class C addresses: 254 hosts is usually too

Class C addresses: 254 hosts is usually too small.small.

nn

Class B addresses provide room for 64K hosts.

Class B addresses provide room for 64K hosts.

–– Organizations usually request class B addresses Organizations usually request class B addresses

but more than 50% of them only have up to 50

but more than 50% of them only have up to 50 hosts!hosts!

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 402: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

402

Scaling IP Addresses 3

Scaling IP Addresses 3

nn

Class C addresses should have 10

Class C addresses should have 10--bit host bit host

numbers instead of only 8

numbers instead of only 8--bit numbers.bit numbers.

––

Would allow for 1022 hosts instead of just 254.

Would allow for 1022 hosts instead of just 254.

–– More Class C networks: network number can More Class C networks: network number can

grow up to 0.5M.

grow up to 0.5M.

nn But, could result in routing table explosion.But, could result in routing table explosion.

–– Routers will have to know about many more Routers will have to know about many more networks.networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 403: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

403

CIDR 1

CIDR 1

nn Classless Classless InterdomainInterdomain

Routing: RFC 1519.

Routing: RFC 1519.

nn No longer uses classes A, B, and C addresses.No longer uses classes A, B, and C addresses.

nn Allocate remaining Class C addresses in Allocate remaining Class C addresses in variablevariable--sized blocks.sized blocks.

––

Example: if an organization needs 2000 addresses,

Example: if an organization needs 2000 addresses,

it’s given a block of 2048 addresses, or 8

it’s given a block of 2048 addresses, or 8 contiguous class C networks and not a full class B contiguous class C networks and not a full class B address.address.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 404: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

404

CIDR 2

CIDR 2

nn New allocation rules for class C addresses.New allocation rules for class C addresses.

nn

World partitioned into 4 zones and each one was

World partitioned into 4 zones and each one was

given portion of class C address space (192~223).

given portion of class C address space (192~223).

––

192.0.0.0~195.255.255.255: Europe.

192.0.0.0~195.255.255.255: Europe.

––

198.0.0.0~199.255.255.255: North America.

198.0.0.0~199.255.255.255: North America.

––

200.0.0.0~201.255.255.255: Central and South America.

200.0.0.0~201.255.255.255: Central and South America.

––

202.0.0.0~203.255.255: Asia and Pacific.

202.0.0.0~203.255.255: Asia and Pacific.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 405: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

405

CIDR 3

CIDR 3

nn

Each region is allocated ~ 32M class C

Each region is allocated ~ 32M class C addresses.addresses.

nn

Addresses 204.0.0.0~223.255.255.255

Addresses 204.0.0.0~223.255.255.255 reserved for future use.reserved for future use.

nn Advantages:Advantages:

–– Less waste.Less waste.

–– Routers can keep only one RT entry per region, Routers can keep only one RT entry per region,

i.e., 32M addresses compressed into one.

i.e., 32M addresses compressed into one.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 406: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

406

CIDR 4

CIDR 4

nn Once packet gets to its destination region, Once packet gets to its destination region, need more detailed routing information.need more detailed routing information.

nn

One possibility is to keep 131,072 (32M/2

One possibility is to keep 131,072 (32M/288) ) entries for all “local” networks.entries for all “local” networks.

–– Explosion problem.Explosion problem.

nn

Instead, use of 32

Instead, use of 32--bit masks: only need to bit masks: only need to keep start address of block.keep start address of block.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 407: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

407

CIDR CIDR --

Example 1

Example 1

nn

Cambridge University has 2048 addresses from

Cambridge University has 2048 addresses from

194.24.0.0~194.24.7.255 and mask 255.255.248.0.

194.24.0.0~194.24.7.255 and mask 255.255.248.0.

nn

Oxford University: 4096 addresses

Oxford University: 4096 addresses

194.24.16.0~194.24.31.255 with mask

194.24.16.0~194.24.31.255 with mask

255.255.240.0.

255.255.240.0.

nn

U of Edinburgh: 1024 addresses

U of Edinburgh: 1024 addresses

194.24.8.0~194.24.11.255 and mask 255.255.252.0.

194.24.8.0~194.24.11.255 and mask 255.255.252.0.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 408: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

408

CIDR CIDR --

Example 2

Example 2

nn Routing tables in Europe contain base address and Routing tables in Europe contain base address and mask:mask:

AddressAddress MaskMask

11000010 00011000 00000000 00000000 11111111 11111111 11111000

11000010 00011000 00000000 00000000 11111111 11111111 11111000 0000000000000000

11000010 00011000 00010000 00000000 11111111 11111111 11110000

11000010 00011000 00010000 00000000 11111111 11111111 11110000 0000000000000000

11000010 00011000 00001000 00000000 11111111 11111111 11111100

11000010 00011000 00001000 00000000 11111111 11111111 11111100 0000000000000000

When packet to 194.24.17.4 (

When packet to 194.24.17.4 (

11000010 00011000 00010001 00000100

11000010 00011000 00010001 00000100) ) arrives, it’s arrives, it’s ANDedANDed with Cambridge U’s mask yielding with Cambridge U’s mask yielding

11000010

11000010

00011000 00010000 00000000

00011000 00010000 00000000 which does not match Cambridge U’s base. which does not match Cambridge U’s base. When it’s When it’s ANDedANDed with Oxford’s mask, it matches Oxford’s base, so with Oxford’s mask, it matches Oxford’s base, so packet sent to Oxford’s router.packet sent to Oxford’s router.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 409: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

409

IP EvolutionIP Evolution

nn

CIDR bought IPv4 a few more years.

CIDR bought IPv4 a few more years.

nn Because of its addressing limitations and to Because of its addressing limitations and to accommodate nextaccommodate next--generation Internet generation Internet applications, IP must evolve.applications, IP must evolve.

nn

In 1990, IETF started work on IP next

In 1990, IETF started work on IP next generation, or generation, or IPngIPng..–– Several proposals were considered.Several proposals were considered.

–– SIPP (Simple Internet Protocol Plus) was selected SIPP (Simple Internet Protocol Plus) was selected

and became IPv6.

and became IPv6.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 410: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

410

IPv6 1

IPv6 1

nn RFCsRFCs

1883~1887.

1883~1887.

nn Features:Features:

––

Longer addresses (16 bytes versus only 4 in IPv4).

Longer addresses (16 bytes versus only 4 in IPv4).

––

Header simplification (only 7 fields versus 13

Header simplification (only 7 fields versus 13

fields in IPv4): faster processing by routers.

fields in IPv4): faster processing by routers.

–– Better option support since fields that were Better option support since fields that were previously required are now optional.previously required are now optional.

–– Improved security and Improved security and QoSQoS support.support.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 411: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

411

IPv6 Header

IPv6 Header

32 bits

Version Priority Flow label

Next header Hop limitPayload length

Source address

(16 bytes)

Destination address

(16 bytes)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 412: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

412

IPv6 Header Fields 1

IPv6 Header Fields 1

nn

Version = 6.

Version = 6.

–– During transition period, routers will examine this field to During transition period, routers will examine this field to decide what kind of packet it is.decide what kind of packet it is.

nn Priority: handling different kinds of traffic. Priority: handling different kinds of traffic.

––

0~7: data that can be flow controlled, e.g., data distribution

0~7: data that can be flow controlled, e.g., data distribution services.services.

––

8~15: real

8~15: real--time traffic (e.g., audio, video)time traffic (e.g., audio, video)

–– Within each group, lower values have lower priority than Within each group, lower values have lower priority than

higher values (e.g., 1 for news, 4 for ftp and 6 for telnet)

higher values (e.g., 1 for news, 4 for ftp and 6 for telnet)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 413: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

413

IPv6 Header Fields 2

IPv6 Header Fields 2

nn Flow label (experimental): allows source and Flow label (experimental): allows source and destination to set up pseudodestination to set up pseudo--connection.connection.–– Try to have some kind of service guarantees.Try to have some kind of service guarantees.

–– Example: assign flow number to a stream of Example: assign flow number to a stream of packets that need reserved bandwidth.packets that need reserved bandwidth.

–– Flow number: Flow number: src+dst+flowsrc+dst+flow #.#.

nn Payload length: length of data.Payload length: length of data.––

Different from IPv4 which specified total length

Different from IPv4 which specified total length of datagram.of datagram.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 414: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

414

IPv6 Header Fields 3

IPv6 Header Fields 3

nn Next header: specifies what is present in the Next header: specifies what is present in the options field (extension headers).options field (extension headers).

nn

Hop limit: equivalent to IPv4’s TTL.

Hop limit: equivalent to IPv4’s TTL.

nn Source and destination addresses:Source and destination addresses:

–– 1616--byte addresses (fixed length).byte addresses (fixed length).

–– Address space is divided by using prefixes.Address space is divided by using prefixes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 415: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

415

IPv6 versus IPv4

IPv6 versus IPv4

nn No more IHL (header length); why?No more IHL (header length); why?

nn No more No more protocolprotocol field: field: next headernext header field.field.

nn No more fragmentationNo more fragmentation--related fields.related fields.

––

All IPv6 hosts and routers must support 576

All IPv6 hosts and routers must support 576--byte packets.byte packets.

–– Fragmentation is less likely to occur.Fragmentation is less likely to occur.

–– Router sends error messages back to source when packet is Router sends error messages back to source when packet is too big so source breaks it down.too big so source breaks it down.

nn No more checksum: rely on more reliable networks No more checksum: rely on more reliable networks and DLL and transport checksums.and DLL and transport checksums.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 416: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

416

IPv6 Addressing 1

IPv6 Addressing 1

nn Separate prefixes for providerSeparate prefixes for provider--based and geographicbased and geographic--based addresses.based addresses.

––

Ability to accommodate 2 ways of address assignment:

Ability to accommodate 2 ways of address assignment:

»» Addresses allocated to ISP companies.Addresses allocated to ISP companies.

nn

Prefix 010.

Prefix 010.

nn Each ISP assigned portion of address space.Each ISP assigned portion of address space.

nn

First 5 bits following prefix defines registry where provider is

First 5 bits following prefix defines registry where provider isregistered.registered.

nn

Remaining 15 bytes are allocated by each provider.

Remaining 15 bytes are allocated by each provider.

nn

Example: 3

Example: 3--byte provider number.byte provider number.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 417: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

417

IPv6 Addressing 2

IPv6 Addressing 2

nn GeographicGeographic--based addresses:based addresses:––

Prefix 100.

Prefix 100.

–– Same model as current Internet.Same model as current Internet.

nn Multicast addresses:Multicast addresses:––

Prefix 11111111.

Prefix 11111111.

–– 44--

bit flag + 4

bit flag + 4--

bit scope fields + 112

bit scope fields + 112--bit group id.bit group id.

––

Flags: 1 bit defines whether group is permanent or

Flags: 1 bit defines whether group is permanent or not.not.

–– Scope: limit reach of multicast packet.Scope: limit reach of multicast packet.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 418: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

418

IPv6 Address Notation

IPv6 Address Notation

nn

8 groups of 4 hexadecimal digits separated

8 groups of 4 hexadecimal digits separated by colons.by colons.

–– Example: Example:

8000:0000:0000:0000:0123:4567:89AB:CDEF

8000:0000:0000:0000:0123:4567:89AB:CDEF

–– Optimizations:Optimizations:

»» Leading zeros within group can be omitted.Leading zeros within group can be omitted.

»» Groups of zeros can be replaced by pair of colons.Groups of zeros can be replaced by pair of colons.nn

8000::123:4567:89AB:CDEF.

8000::123:4567:89AB:CDEF.

»»

IPv4 addresses: ::192.31.20.46.

IPv4 addresses: ::192.31.20.46.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 419: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

419

Extension Headers 1

Extension Headers 1

nn

Equivalent to IPv4 options.

Equivalent to IPv4 options.

nn

6 types of extension headers:

6 types of extension headers:HopHop--byby--hop optionshop options Misc. info for routersMisc. info for routers

RoutingRouting Full or partial route includedFull or partial route included

FragmentationFragmentation Management of fragmentsManagement of fragments

AuthenticationAuthentication Verification of source’s idVerification of source’s id

Encrypted payloadEncrypted payload Information about encryptionInformation about encryption

Destination optionsDestination options Information for destinationInformation for destination

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 420: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

420

Extension Headers 2

Extension Headers 2

nn Fixed format and variableFixed format and variable--sized headers.sized headers.

nn VariableVariable--sized headers:sized headers:

–– (type, length, value).(type, length, value).

––

Type: 1 byte specifying which option this is.

Type: 1 byte specifying which option this is.

»»

First 2 bits tell option

First 2 bits tell option--uncapableuncapable routers what to do: skip option, routers what to do: skip option, discard packet, discard packet with ICMP message, discard packetdiscard packet, discard packet with ICMP message, discard packetwithout ICMP packet for multicast addresses.without ICMP packet for multicast addresses.

––

Length: how long value field (0~255 bytes).

Length: how long value field (0~255 bytes).

–– Value: information.Value: information.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 421: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

421

HopHop--byby--Hop HeaderHop Header

nn Convey information all routers along path Convey information all routers along path must examine.must examine.–– JumbogramsJumbograms: : datagramsdatagrams

> 64KBytes.

> 64KBytes.

–– Next header: what option this is.Next header: what option this is.

–– Length of hopLength of hop--byby--

hop header excluding the first 8

hop header excluding the first 8 (mandatory) bytes.(mandatory) bytes.

–– Defines option, in this case datagram size.Defines option, in this case datagram size.

Next Header

0 194 0

Jumbogram payload length

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 422: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

422

Routing HeaderRouting Header

nn Lists one or more routers that must be Lists one or more routers that must be visited on the way to the destination.visited on the way to the destination.

–– Strict source routing: full path is supplied.Strict source routing: full path is supplied.

–– Loose source routing: only selected routers are Loose source routing: only selected routers are listed.listed.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 423: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

423

Fragment HeaderFragment Header

nn Allows source to fragment datagram.Allows source to fragment datagram.

––

In IPv6, routers are not allowed to fragment.

In IPv6, routers are not allowed to fragment.

–– If a router receives packet that is too big, it If a router receives packet that is too big, it discards it and sends back a ICMP message to discards it and sends back a ICMP message to source.source.

–– Source uses this option to fragment packet, and Source uses this option to fragment packet, and resend it.resend it.

–– Contains datagram id, fragment number, and Contains datagram id, fragment number, and “last fragment” bit.“last fragment” bit.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 424: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

424

Authentication HeaderAuthentication Header

nn Supports verification of sender’s identity.Supports verification of sender’s identity.

nn Contains authentication key and Contains authentication key and cryptographic checksum of the whole cryptographic checksum of the whole datagram.datagram.

nn Receiver uses key number to find secret Receiver uses key number to find secret key. Computes checksum using secret key key. Computes checksum using secret key and checks whether it matches with and checks whether it matches with received datagram.received datagram.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 425: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

425

Destination OptionsDestination Options

nn Supports options that need only be Supports options that need only be interpreted by destination host.interpreted by destination host.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 426: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

426

Network Layer in ATM Network Layer in ATM NetworksNetworks

nn ATM layer: connection oriented.ATM layer: connection oriented.

–– Provides connectionProvides connection--oriented service.oriented service.

–– Uses virtual circuits, or virtual channels.Uses virtual circuits, or virtual channels.

–– No No ACKsACKs..

»» Intended for fiber networks.Intended for fiber networks.

»» Intended for realIntended for real--time traffic.time traffic.

–– Ordering guarantees.Ordering guarantees.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 427: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

427

ATM NetworksATM Networks

nn Virtual path: group of virtual circuits.Virtual path: group of virtual circuits.

–– When reWhen re--routed, all VCs are rerouted, all VCs are re--routed together.routed together.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 428: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

428

ATM CellsATM Cells

nn

53 bytes!

53 bytes!

nn

2 different formats:

2 different formats:

–– UNI: userUNI: user--network interface.network interface.

»» Between host and ATM network (carrier).Between host and ATM network (carrier).

–– NNI: networkNNI: network--network interface.network interface.

»»

Between 2 ATM switches (ATM for routers).

Between 2 ATM switches (ATM for routers).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 429: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

429

Cell FormatsCell Formats

GFC VPI VCI PTI P HEC

4 bits

8 bits

16 bits

3 bits 8 bits

UNI Header:

NNI Header:

VPI VCI PTI P HEC

GFC: General flow controlVPI: Virtual path idVCI: Virtual channel id

PTI: Payload typeC: Cell loss priorityHEC: Header error control

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 430: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

430

Cell Fields 1

Cell Fields 1

nn GFC: only in UNI cells.GFC: only in UNI cells.

––

No e2e significance.

No e2e significance.

–– First switch overwrites it.First switch overwrites it.

–– Not currently used.Not currently used.

nn

VPI: specifies virtual path (up to 256 VPs).

VPI: specifies virtual path (up to 256 VPs).

nn

VCI: specifies virtual circuit (up to 64K

VCI: specifies virtual circuit (up to 64K VCs).VCs).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 431: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

431

Cell Fields 2

Cell Fields 2

nn PTI: type of payload.PTI: type of payload.–– Cell type defined by user, congestion info by Cell type defined by user, congestion info by

network.network.

Payload TypePayload Type MeaningMeaning000000

User data, no congestion, cell type 0

User data, no congestion, cell type 0

001001

User data, no congestion, cell type 1

User data, no congestion, cell type 1

010010

User data, congestion, cell type 0

User data, congestion, cell type 0

011011

User data, congestion, cell type 1

User data, congestion, cell type 1

100100 Control info adjacent switchesControl info adjacent switches

101101 Control info between Control info between srcsrc and and dstdst

110110 Resource management (ABR CC)Resource management (ABR CC)

111111 ReservedReserved

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 432: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

432

Cell Field 3

Cell Field 3

nn CLP bit may be set by host to differentiate CLP bit may be set by host to differentiate highhigh-- from lowfrom low--priority traffic when priority traffic when choosing cell to discard if congestion.choosing cell to discard if congestion.

nn HEC: header checksum.HEC: header checksum.

nn

Payload: 48 bytes.

Payload: 48 bytes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 433: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

433

Connection SetupConnection Setup

nn Permanent and switched VCs.Permanent and switched VCs.

–– Permanent: always present (like leased lines).Permanent: always present (like leased lines).

–– Switched: need to be established (like phone Switched: need to be established (like phone calls).calls).

nn How are switched VCs established?How are switched VCs established?

––

Separate protocol called Q.2931.

Separate protocol called Q.2931.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 434: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

434

VC SetupVC Setup

Source

Switch 1

Switch 2 DestinationSetup

Setup

SetipCall processing

Call processing

ConnectConnect

Connect

Connect ack

Connect ackConnect ack

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 435: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

435

VC TearVC Tear--downdown

Release

Release

Release

Release complete

Release complete

Release complete

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 436: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

436

Routing and SwitchingRouting and Switching

nn Routing using VPs and VCs.Routing using VPs and VCs.

–– Route on Route on VPIsVPIs except at the final hop.except at the final hop.

–– Advantages:Advantages:

»» Once VP established, all VCs between Once VP established, all VCs between srcsrc--dstdst can can follow the same path: no new routing decisions.follow the same path: no new routing decisions.

»»

Cell switching only needs to look at the VP (12bits)

Cell switching only needs to look at the VP (12bits)

instead of VP (12 bits) + VC (16 bits).

instead of VP (12 bits) + VC (16 bits).

»» Easier to reEasier to re--route whole group of VCs.route whole group of VCs.

»» Easier for carriers to offer private networks.Easier for carriers to offer private networks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 437: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

437

Network Layer in ATM Network Layer in ATM NetworksNetworks

[Continuation][Continuation]

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 438: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

438

Service Categories 1

Service Categories 1

nn Types of traffic carried by ATM networks Types of traffic carried by ATM networks and types of services required by users.and types of services required by users.

–– ConstantConstant--bit rate (CBR): bit rate (CBR):

»» No error or flow control.No error or flow control.

»» ConstantConstant--rate, synchronous bit transmission.rate, synchronous bit transmission.

»» Accommodate traffic carried by current telephone Accommodate traffic carried by current telephone

system: T1 lines, voice

system: T1 lines, voice--grade lines.grade lines.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 439: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

439

Service Categories 2

Service Categories 2

nn Variable bit rate (VBR):Variable bit rate (VBR):–– RTRT--VBR: variable bit rates and realVBR: variable bit rates and real--time time

requirements.requirements.»» Example: interactive compressed video Example: interactive compressed video

(videoconferencing applications).(videoconferencing applications).

»» Compression schemes: base frame+differences between Compression schemes: base frame+differences between current and base frames: transmission rate varies over current and base frames: transmission rate varies over time.time.

»» Cell delay and cell delay variation must be controlled: Cell delay and cell delay variation must be controlled: image quality.image quality.

»» But occasional loss is tolerable.But occasional loss is tolerable.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 440: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

440

Service Categories 3

Service Categories 3

nn Variable bit rate (VBR):Variable bit rate (VBR):

–– NRTNRT--VBR: services with variable bit rates and VBR: services with variable bit rates and non realnon real--time requirements.time requirements.

»» Example: multimedia eExample: multimedia e--mail (stored in disk; eliminates mail (stored in disk; eliminates delay variation).delay variation).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 441: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

441

Service Categories 4

Service Categories 4

nn Available bit rate (ABR): Available bit rate (ABR):

–– Targets Targets burstybursty traffic.traffic.

–– Guarantees average demand and will try to Guarantees average demand and will try to provide peak demand.provide peak demand.

–– Network provides feedback to sender: request Network provides feedback to sender: request sender to slow down if congestion.sender to slow down if congestion.

–– If senders are wellIf senders are well--behaved, low loss rate.behaved, low loss rate.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 442: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

442

Service Categories 5

Service Categories 5

nn Unspecified bit rate (UBR):Unspecified bit rate (UBR):

–– No guarantees: best effort.No guarantees: best effort.

–– Suited to IP traffic.Suited to IP traffic.

–– Potential applications: file transfer, ePotential applications: file transfer, e--mail, mail, news.news.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 443: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

443

Quality of Service Quality of Service

nn Service offered by the network (carrier) to customer Service offered by the network (carrier) to customer (end user): service agreement.(end user): service agreement.

nn Service agreement: offered traffic, offered service, Service agreement: offered traffic, offered service, compliance requirements.compliance requirements.

nn If customer and carrier don’t agree: VC will not be If customer and carrier don’t agree: VC will not be set up.set up.

nn Different requirements for each direction.Different requirements for each direction.

–– E.g., VOD application: required bandwidth userE.g., VOD application: required bandwidth user-->server >server <> server<> server-->user.>user.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 444: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

444

Quality of Service Parameters 1

Quality of Service Parameters 1

Peak cell rate PCR Max. cell transmission rateSustained cell rate SCR Average cell rateMinimum cell rate MCR Min. acceptable cell rateCell delay variation tolerance CDVT Max. acceptable cell jitterCell loss ratio CLR Fraction of lost cellsCell transfer delay CTD Time to deliverCell delay variation CDV Delivery delay variationCell error rate CER Fraction of correct cells

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 445: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

445

QoSQoS

Parameters 2

Parameters 2

nn PCR, SCR, MCR, and CVDT: specified by PCR, SCR, MCR, and CVDT: specified by sender.sender.

nn CLR, CTD, and CDV describe network CLR, CTD, and CDV describe network conditions and are measured at receiver.conditions and are measured at receiver.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 446: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

446

Traffic PolicingTraffic Policing

nn Checking whether each cell conforms to Checking whether each cell conforms to service agreement parameters.service agreement parameters.

nn

2 parameters:

2 parameters:

–– Maximum allowed arrival rate (PCR).Maximum allowed arrival rate (PCR).

»» Or minimum interOr minimum inter--arrival time.arrival time.

–– Amount of acceptable variation (CDVT).Amount of acceptable variation (CDVT).

nn Enforcing service agreement:Enforcing service agreement:

–– NonNon--conforming cells are dropped.conforming cells are dropped.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 447: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

447

Congestion ControlCongestion Control

nn Admission control:Admission control:–– Congestion avoidance strategy.Congestion avoidance strategy.

–– New flow specifies offered traffic and expected New flow specifies offered traffic and expected service.service.

–– Before setting up VC, network checks whether Before setting up VC, network checks whether requested resources are available without affecting requested resources are available without affecting other flows.other flows.

–– If no routes satisfy request, call is rejected.If no routes satisfy request, call is rejected.

–– Prevent starvation by dividing users into classes.Prevent starvation by dividing users into classes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 448: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

448

Resource ReservationResource Reservation

nn Resources can be reserved at call setup Resources can be reserved at call setup time.time.

nn Reserve peak bandwidth along each hop.Reserve peak bandwidth along each hop.

nn Reserving peak versus average bandwidth.Reserving peak versus average bandwidth.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 449: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

449

RateRate--

Based Congestion Control 1

Based Congestion Control 1

nn CBR and VBR: sender cannot slow down CBR and VBR: sender cannot slow down due to realdue to real--time nature of traffic.time nature of traffic.

nn UBR: extra cells are simply dropped.UBR: extra cells are simply dropped.

nn ABR: network can signal congestion asking ABR: network can signal congestion asking sender(s) to slow down.sender(s) to slow down.

nn ACR: actual cell rate.ACR: actual cell rate.

–– For each sender.For each sender.

–– MCR < ACR < PCRMCR < ACR < PCR

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 450: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

450

RateRate--

Based Congestion Control 2

Based Congestion Control 2

nn Resource management (RM) cell:Resource management (RM) cell:

–– Transmitted after a certain number of data cells Transmitted after a certain number of data cells traveling along same path.traveling along same path.

–– Carry the explicit rate (ER), which is rate at Carry the explicit rate (ER), which is rate at which sender would currently like to transmit.which sender would currently like to transmit.

–– Congested switches may reduce ER.Congested switches may reduce ER.

–– When RM cell comes back, sender knows When RM cell comes back, sender knows acceptable rate and adjusts ACR accordingly.acceptable rate and adjusts ACR accordingly.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 451: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

451

The Transport LayerThe Transport Layer

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 452: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

452

The Transport LayerThe Transport Layer

nn EndEnd--toto--end.end.

–– Communication from source to destination Communication from source to destination host.host.

–– Only hosts run transportOnly hosts run transport--level protocols.level protocols.

–– Under user’s control as opposed to network Under user’s control as opposed to network layer which is controlled/owned by carrier.layer which is controlled/owned by carrier.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 453: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

453

The Transport ServiceThe Transport Service

nn Service provided to application layer.Service provided to application layer.

nn Transport entity: process that implements Transport entity: process that implements the transport protocol running on a host.the transport protocol running on a host.

–– At OS kernel, userAt OS kernel, user--level process, or network level process, or network card.card.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 454: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

454

The Transport LayerThe Transport Layer

TransportEntity

ApplicationLayer

Network Layer

Transportaddress

NetworkAddress

Transport/networkinterface

Application/transportinterface Transport

Entity

ApplicationLayer

Network Layer

TPDU

Source host Destination host

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 455: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

455

Types of Transport ServicesTypes of Transport Services

nn ConnectionConnection--less versus connectionless versus connection--oriented.oriented.

nn ConnectionConnection--less service: no logical less service: no logical connections, no flow or error control.connections, no flow or error control.

nn ConnectionConnection--oriented: oriented:

–– Based on logical connections: connection setup, Based on logical connections: connection setup, data transfer, connection teardown.data transfer, connection teardown.

–– Flow and error control.Flow and error control.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 456: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

456

Transport versus NetworkTransport versus NetworkLayerLayer

nn Transport layer is “controlled” by user.Transport layer is “controlled” by user.

–– Ability to enhance network layer quality of Ability to enhance network layer quality of service.service.

–– Example: transport service can be more reliable Example: transport service can be more reliable than underlying network service.than underlying network service.

–– Transport layer makes standard set of Transport layer makes standard set of primitives available to users which are primitives available to users which are independent from the network service independent from the network service primitives, which may vary considerably.primitives, which may vary considerably.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 457: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

457

Quality of ServiceQuality of Service

nn User may specify User may specify QoSQoS parameters at then parameters at then transport layer.transport layer.

–– At connection setup time, user may define At connection setup time, user may define preferred, acceptable, and minimum values for preferred, acceptable, and minimum values for various service parameters.various service parameters.

–– Transport layer determines whether it’s Transport layer determines whether it’s possible to provide required service based on possible to provide required service based on available network service(s).available network service(s).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 458: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

458

TransportTransport--Layer Layer QoSQoS Parameters Parameters 11

nn Connection establishment delay: time to Connection establishment delay: time to establish connection.establish connection.

nn Connection establishment failure Connection establishment failure probability: probability connection is not probability: probability connection is not established within maximum establishment established within maximum establishment time.time.

nn Throughput: bytes transferred per second Throughput: bytes transferred per second measured over a time interval.measured over a time interval.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 459: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

459

TransportTransport--Layer Layer QoSQoS Parameters Parameters 22

nn Transit delay: time between sending a Transit delay: time between sending a message and receiving it on the other side message and receiving it on the other side (measured by the transport entities).(measured by the transport entities).

nn Residual error ratio: ratio of messages in error Residual error ratio: ratio of messages in error to total messages sent.to total messages sent.

nn Priority: way for user to indicate that some Priority: way for user to indicate that some connections are more important.connections are more important.

nn Resilience: probability connection is Resilience: probability connection is terminated due to congestion, etc. terminated due to congestion, etc.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 460: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

460

Transport Layer Transport Layer QoSQoS

nn Only few transport protocols provide Only few transport protocols provide QoSQoSparameters. parameters.

nn Most just try to minimize residual error rate.Most just try to minimize residual error rate.

nn QoSQoS parameters specified by transport user parameters specified by transport user when connection is setup.when connection is setup.–– Desired and minimum acceptable values can be Desired and minimum acceptable values can be

specified. specified.

–– Service negotiation.Service negotiation.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 461: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

461

Transport Service PrimitivesTransport Service Primitives

nn Allow transport users (e.g., application Allow transport users (e.g., application programs) to access transport service.programs) to access transport service.

nn Example: connectionExample: connection--oriented transport oriented transport service primitives.service primitives.PRIMITIVEPRIMITIVE TPDU SentTPDU Sent MeaningMeaningLISTENLISTEN (none)(none) listen for connectionlisten for connection

CONNECTCONNECT Connection Req. try to establish connectionConnection Req. try to establish connection

SENDSEND DATADATA send datasend data

RECEIVERECEIVE (none)(none) waits for datawaits for dataDISCONNECTDISCONNECT Disc. Req.Disc. Req. try to release connectiontry to release connection

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 462: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

462

TPDUTPDU

nn Transport protocol data unit.Transport protocol data unit.

nn Messages sent between transport entities.Messages sent between transport entities.

nn TPDUsTPDUs contained in networkcontained in network--layer packets, layer packets, which in turn are contained in DLL frames.which in turn are contained in DLL frames.

Frameheader

Packetheader

TPDUheader

TPDU payload

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 463: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

463

Connection Management State Connection Management State MachineMachine

Established

Idle

Activeestablishmentpending

Activedisconnectpending

Idle

Passiveestablishmentpending

Passivedisconnectpending

Connectexecuted

ConnectionAccept

SERVER CLIENTConnection req. received

Connectexecuted

Disc. req.received

s

Disconnectexecuted

Disconnectexecute

Disc. accept. received

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 464: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

464

Berkeley Sockets 1

Berkeley Sockets 1

nn Set of transportSet of transport--level primitives made available by level primitives made available by Berkeley UNIX. Berkeley UNIX.

nn Server side: Server side: »» SOCKET: create new communication end point.SOCKET: create new communication end point.

»» BIND: attach local address to socket (once server binds address,BIND: attach local address to socket (once server binds address,clients can connect to it).clients can connect to it).

»» LISTEN: listen for connection.LISTEN: listen for connection.

»» ACCEPT: accept new connection.ACCEPT: accept new connection.

»» SEND, RECEIVE: send and receive data.SEND, RECEIVE: send and receive data.

»» CLOSE: release connection.CLOSE: release connection.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 465: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

465

Berkeley Sockets 2

Berkeley Sockets 2

nn Client side:Client side:»» SOCKET: create socket.SOCKET: create socket.

»» CONNECT: try to establish connection.CONNECT: try to establish connection.

»» SEND, RECEIVE: send and receive data.SEND, RECEIVE: send and receive data.

»» CLOSE: release connection. CLOSE: release connection.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 466: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

466

Transport Protocol Issues: Transport Protocol Issues: AddressingAddressing

nn Address of the transportAddress of the transport--level entity.level entity.

nn TSAP: transport service access point TSAP: transport service access point (analogous to NSAP).(analogous to NSAP).

–– Internet TSAP: (IP address, local port).Internet TSAP: (IP address, local port).

–– Internet NSAP: IP address.Internet NSAP: IP address.

–– There may be multiple There may be multiple TSAPsTSAPs on one host.on one host.

–– Typically, only one NSAP.Typically, only one NSAP.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 467: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

467

Example 1

Example 1

nn Finding the time of day from a timeFinding the time of day from a time--ofof--day day server.server.

–– TimeTime--ofof--

day server process on host 2 attaches

day server process on host 2 attaches

itself to TSAP 122 and waits for requests (e.g.,

itself to TSAP 122 and waits for requests (e.g., through LISTEN).through LISTEN).

––

Application process (TSAP 6) on host 1 wants

Application process (TSAP 6) on host 1 wants to find out the timeto find out the time--ofof--day; issues CONNECT day; issues CONNECT

specifying TSAP 6 as source and TSAP 122 as

specifying TSAP 6 as source and TSAP 122 as destination.destination.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 468: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

468

Example 2

Example 2

––

Transport entity on host 1 tries to establish

Transport entity on host 1 tries to establish

transport connection between its TSAP 6 and

transport connection between its TSAP 6 and

the TSAP 122 on host 2.

the TSAP 122 on host 2.

––

Transport entity on host 2 contacts process on

Transport entity on host 2 contacts process on

TSAP 122; if it agrees, transport connection

TSAP 122; if it agrees, transport connection established.established.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 469: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

469

Finding Services 1

Finding Services 1

nn WellWell--known TSAP.known TSAP.–– TimeTime--ofof--

day server has been using TSAP 122 forever so

day server has been using TSAP 122 forever so every users know it.every users know it.

nn Initial connection protocol: special Initial connection protocol: special process process serverserver that proxies for less wellthat proxies for less well--known known services.services.–– Process server listens to set of ports at the same time.Process server listens to set of ports at the same time.

–– Users CONNECT to a TSAP, and if there are no servers, Users CONNECT to a TSAP, and if there are no servers, process server is likely to be listening. It them spawns process server is likely to be listening. It them spawns requested server.requested server.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 470: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

470

Finding Services 2

Finding Services 2

nn Name or directory service.Name or directory service.

–– Name server listens to wellName server listens to well--known TSAP.known TSAP.

–– User sends service name and name server User sends service name and name server responds with service’s TSAP.responds with service’s TSAP.

–– New services need to register with name server.New services need to register with name server.

nn Finding the server’s network address.Finding the server’s network address.

–– Hierarchical addresses solve this problem, i.e., the Hierarchical addresses solve this problem, i.e., the NSAP is part of the TSAP.NSAP is part of the TSAP.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 471: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

471

Connection EstablishmentConnection Establishment

nn CONNECTION REQUEST and CONNECTION CONNECTION REQUEST and CONNECTION ACCEPTED ACCEPTED TPDUsTPDUs..

nn Problem: delayed duplicates.Problem: delayed duplicates.

–– Duplicates can reDuplicates can re--appear and be taken as the real appear and be taken as the real messages.messages.

nn Solution: messages age and are discarded after some Solution: messages age and are discarded after some time; need to discard time; need to discard ack’sack’s..

–– Maximum hop count.Maximum hop count.

–– Timestamp.Timestamp.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 472: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

472

Avoiding Duplicates 1

Avoiding Duplicates 1

nn

2 identically numbered

2 identically numbered TPDUsTPDUs are never are never outstanding at the same time.outstanding at the same time.

nn Bounded packet lifetime.Bounded packet lifetime.

nn Each host has its clock.Each host has its clock.

–– Clock as a counter that increments itself.Clock as a counter that increments itself.

–– #bits(counter)>= #bits(sequence number).#bits(counter)>= #bits(sequence number).

–– Clocks don’t “crash”.Clocks don’t “crash”.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 473: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

473

Avoiding Duplicates 2

Avoiding Duplicates 2

nn When connection setup, lowWhen connection setup, low--order order kk bits of bits of clock used as initial sequence number.clock used as initial sequence number.

nn Each connection starts numbering its Each connection starts numbering its TPDUsTPDUs with different sequence number.with different sequence number.

nn Sequence number space need to be such that Sequence number space need to be such that by the time sequence numbers wrap around, by the time sequence numbers wrap around, old old TPDUsTPDUs with same sequence numbers with same sequence numbers have aged.have aged.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 474: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

474

Sequence Numbers versus Time Sequence Numbers versus Time 11

Seq.#’s

Time

. Linear relation between timeand initial sequence number.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 475: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

475

Sequence Numbers versus Time Sequence Numbers versus Time 22

Seq.#’s

Time

. Host crash: when it comes up, it doesn’t know where it ere in the sequence # space.

T

Forbiddenregion

. Example: T=60 sec and clock ticks once per second.

. At t=30s, TPDU on connection

5 gets seq

.# 80.. Host crashes and comes up.

. At t=60s, reopens connections 0~4.

. At t=70s, reopens connection 5 and at t=80s, sends TPDU 80.

. Old TPDU 80 still valid, and one would look like a duplicate.

. To prevent this, check if it’s in the “forbidden region” and delaysequence number.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 476: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

476

ThreeThree--Way HandshakeWay Handshake

nn

Solves the problem of getting 2 sides to

Solves the problem of getting 2 sides to agree on initial sequence number.agree on initial sequence number.

CR (seq=x)

ACK(seq=y,ACK=x)

DATA(seq=x, ACK=y)

CR: connectionrequest.

1 2

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 477: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

477

33--

Way Handshake: Duplicates 1

Way Handshake: Duplicates 1

. Old duplicate CR.

. The ACK from host 2 tries

to verify if host 1 was trying to open a new connection with seq=x.

. Host 1 rejects host 2’s attempt to establish.

Host 2 realizes it was a duplicateCR and aborts connection.

CR(seq=x)*

ACK(seq=y, ACK=x)

REJECT(ACK=y)

1 2

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 478: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

478

33--

Way Handshake: Duplicates 2

Way Handshake: Duplicates 2

. Old duplicate CR and ACKto connection accepted.CR(seq=x)*

ACK(seq=y, ACK=x)

REJECT(ACK=y)

1 2

DATA(seq=x,ACK=z)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 479: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

479

Connection ReleaseConnection Release

nn Asymmetric release: telephone system.Asymmetric release: telephone system.

–– When one party hangs up, connection breaks.When one party hangs up, connection breaks.

–– May cause data loss.May cause data loss.

nn Symmetric release: Symmetric release:

––

Treats connection as 2 separate unidirectional

Treats connection as 2 separate unidirectional connections.connections.

–– Requires each to be released separately.Requires each to be released separately.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 480: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

480

Symmetric ReleaseSymmetric Release

nn How to determine when all data has been How to determine when all data has been sent and connection could be released?sent and connection could be released?

nn 22--army problem:army problem:

Blue army 1

White army

Blue army 2

. White army largerthan either blue armies.. Blue army together is larger.. If each blue army attacks, it’ll be defeated. They win if attack together.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 481: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

481

22--

Army Problem 1

Army Problem 1

nn To synchronize attack, they must use messengers that To synchronize attack, they must use messengers that need to cross valley: unreliable.need to cross valley: unreliable.

nn Is there a protocol that allows blue army to win? No.Is there a protocol that allows blue army to win? No.

––

Blue army 1 sends message to blue army 2.

Blue army 1 sends message to blue army 2.

––

Blue army 2 sends ACK back.

Blue army 2 sends ACK back.

––

Blue army 2 is not sure whether ACK was received.

Blue army 2 is not sure whether ACK was received.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 482: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

482

22--

Army Problem 2

Army Problem 2

nn

Use 2

Use 2--way handshake.way handshake.

––

Blue army 1

Blue army 1 ACKsACKs back but it’ll never know if back but it’ll never know if the ACK was received.the ACK was received.

nn Applying to connection release:Applying to connection release:

–– Neither side is prepared to disconnect until Neither side is prepared to disconnect until convince other side is prepared to disconnect.convince other side is prepared to disconnect.

–– In practice, hosts are willing to take risks. In practice, hosts are willing to take risks.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 483: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

483

Connection Release ProtocolConnection Release Protocol

DR

DR

ACK

DR: disconnectionrequest.

Send DR+start timer

Send DR+start timerRelease

connection

Send ACK Release

connection

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 484: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

484

Connection Release Scenarios 1

Connection Release Scenarios 1

DR

DR

ACK

DR: disconnectionrequest.

Send DR+start timer

Send DR+start timerRelease

connection

Send ACK Timeout:

Release connection

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 485: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

485

Connection Release Scenarios 2

Connection Release Scenarios 2

DR

DR

DR: disconnectionrequest.

Send DR+start timer

Send DR+start timerTimeout:

send DR+start timer

Release connection

DR

Send DR+start timerDR

ACK

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 486: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

486

The Internet Transport Protocols: The Internet Transport Protocols: TCP and UDPTCP and UDP

nn

UDP: user datagram protocol (RFC 768).

UDP: user datagram protocol (RFC 768).

–– ConnectionConnection--less protocol.less protocol.

nn TCP: transmission control protocol (TCP: transmission control protocol (RFCsRFCs

793, 1122, 1323).

793, 1122, 1323).

–– ConnectionConnection--oriented protocol.oriented protocol.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 487: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

487

UDPUDP

nn Provides connectionProvides connection--less, unreliable service.less, unreliable service.

–– No delivery guarantees.No delivery guarantees.

–– No ordering guarantees.No ordering guarantees.

–– No duplicate detection.No duplicate detection.

nn Low overhead.Low overhead.

–– No connection establishment/teardown.No connection establishment/teardown.

nn Suitable for shortSuitable for short--lived connections.lived connections.

–– Example: clientExample: client--server applications. server applications.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 488: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

488

UDP Segment FormatUDP Segment Format

0 15 31

Source port Destination port

Length Checksum

Data

Source and destination ports: identify the end points.

Length: 8-byte header+ data.Checksum: optional; if not used, set to zero.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 489: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

489

UDP ChecksumUDP Checksum

nn Computed over a Computed over a pseudopseudo--headerheader+ UDP + UDP header+data+padding (to even number of header+data+padding (to even number of bytes if needed).bytes if needed).

nn PseudoPseudo--header:header:

0 31

Source IP address

Destination IP address

00000000 Protocol Segment length

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 490: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

490

TCPTCP

nn Reliable endReliable end--toto--end communication.end communication.

nn TCP transport entity:TCP transport entity:

–– Runs on machine that supports TCP.Runs on machine that supports TCP.

–– Interfaces to the IP layer.Interfaces to the IP layer.

–– Manages TCP streams.Manages TCP streams.

»» Accepts user data, breaks it down and sends it as Accepts user data, breaks it down and sends it as separate IP separate IP datagramsdatagrams..

»» At receiver, reconstructs original byte stream from At receiver, reconstructs original byte stream from IP IP datagramsdatagrams..

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 491: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

491

TCP ReliabilityTCP Reliability

nn Reliable delivery.Reliable delivery.

–– ACKsACKs..

–– Timeouts and retransmissions.Timeouts and retransmissions.

nn Ordered delivery.Ordered delivery.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 492: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

492

TCP Service Model 1

TCP Service Model 1

nn Obtained by creating TCP end points.Obtained by creating TCP end points.

–– Example: UNIX sockets.Example: UNIX sockets.

––

TSAP address: IP address + 16

TSAP address: IP address + 16--bit port bit port number.number.

–– Multiple connections can share same port pair.Multiple connections can share same port pair.

––

Port numbers below 1024: well

Port numbers below 1024: well--known ports known ports reserved for standard services.reserved for standard services.

»» List of wellList of well--

known ports in RFC 1700.

known ports in RFC 1700.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 493: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

493

TCP Service Model 2

TCP Service Model 2

nn TCP connections are fullTCP connections are full--duplex and pointduplex and point--toto--point.point.

nn Byte stream (not message stream).Byte stream (not message stream).

––

Message boundaries are not preserved e2e.

Message boundaries are not preserved e2e.

A B C D

4 512-byte segments sent asseparate IP datagrams

A B C D

2048 bytes of data deliveredto application in single READ

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 494: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

494

TCP Byte StreamTCP Byte Stream

nn When application passes data to TCP, it When application passes data to TCP, it may send it immediately or buffer it.may send it immediately or buffer it.

nn Sometimes application wants to send data Sometimes application wants to send data immediately.immediately.

–– Example: interactive applications.Example: interactive applications.

–– Use PUSH flag to force transmission.Use PUSH flag to force transmission.

nn URGENT flag.URGENT flag.

–– Also forces TCP to transmit at once.Also forces TCP to transmit at once.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 495: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

495

TCP Protocol Overview 1

TCP Protocol Overview 1

nn TCP’s TPDU: segment.TCP’s TPDU: segment.

–– 2020--byte header + options.byte header + options.

–– Data.Data.

–– TCP entity decides the size of segment.TCP entity decides the size of segment.

»»

2 limits: 64KByte IP payload and MTU.

2 limits: 64KByte IP payload and MTU.

»» Segments that are too large are fragmented.Segments that are too large are fragmented.nn More overhead by addition of IP header. More overhead by addition of IP header.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 496: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

496

TCP Protocol Overview 2

TCP Protocol Overview 2

nn Sequence numbers.Sequence numbers.

–– Reliability, ordering, and flow control.Reliability, ordering, and flow control.

–– Assigned to every byte.Assigned to every byte.

–– 3232--bit sequence numbers.bit sequence numbers.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 497: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

497

TCP Segment HeaderTCP Segment Header

Source port Destination port

Sequence number

Acknowledgment numberHeaderlength

UA P R S F Window size

Checksum Urgent pointer

Options (0 or more 32-bit words)

Data

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 498: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

498

TCP Header Fields 1

TCP Header Fields 1

nn Source and destination ports identify Source and destination ports identify connection end points.connection end points.

nn Sequence number.Sequence number.

nn Acknowledgment number specifies next byte Acknowledgment number specifies next byte expected.expected.

nn

TCP header length: how many 32

TCP header length: how many 32--bit words bit words are contained in header.are contained in header.

nn 66--bit unused field.bit unused field.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 499: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

499

TCP Header Fields 2

TCP Header Fields 2

nn

6 1

6 1--bit flags:bit flags:

–– URG: indicate urgent data present; URG: indicate urgent data present; urgent urgent pointerpointer gives byte offset from current sequence gives byte offset from current sequence number where urgent data is.number where urgent data is.

–– ACK: indicates whether segment contains ACK: indicates whether segment contains

acknowledgment; if 0,

acknowledgment; if 0, acknowledgement acknowledgement numbernumber field ignored.field ignored.

–– PUSH: indicates PUSH: indicates PUSHedPUSHed data so receiver data so receiver delivers it to application immediately.delivers it to application immediately.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 500: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

500

TCP Header Fields 3

TCP Header Fields 3

nn Flags (cont’d):Flags (cont’d):

–– RST: used to reset connection, reject invalid RST: used to reset connection, reject invalid segment, or refuse to open connection.segment, or refuse to open connection.

–– SYN: used to establish connection; connection SYN: used to establish connection; connection

request, SYN=1, ACK=0.

request, SYN=1, ACK=0.

–– FIN: used to release connection.FIN: used to release connection.

nn Window size: how many bytes can be sent Window size: how many bytes can be sent starting at starting at acknowledgment numberacknowledgment number..

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 501: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

501

TCP Header Fields 4

TCP Header Fields 4

nn Checksum: checksums the Checksum: checksums the header+data+pseudoheader+data+pseudo--header.header.

nn Options: provide way to add extra Options: provide way to add extra information.information.

–– Examples: Examples:

»» Maximum payload host is willing to accept; can be Maximum payload host is willing to accept; can be advertised during connection setup.advertised during connection setup.

»» Window scale factor that allows sender and receiver Window scale factor that allows sender and receiver to negotiate larger window sizes.to negotiate larger window sizes.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 502: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

502

TCP Connection SetupTCP Connection Setup

nn 33--way handshake.way handshake.

Host 1

Host 2SYN (SEQ=x)

SYN(SEQ=y,ACK=x+1)

(SEQ=x+1, ACK=y+1)

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 503: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

503

TCP Connection Release 1

TCP Connection Release 1

nn Abrupt release:Abrupt release:

–– Send RESET.Send RESET.

–– May cause data loss.May cause data loss.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 504: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

504

TCP Connection Release 2

TCP Connection Release 2

nn Graceful release:Graceful release:–– Each side of the connection released Each side of the connection released

independently.independently.»»

Either side send TCP segment with FIN=1.

Either side send TCP segment with FIN=1.

»» When FIN acknowledged, that direction is shut down for data.When FIN acknowledged, that direction is shut down for data.

»» Connection released when both sides shut down. Connection released when both sides shut down.

––

4 segments: 1 FIN and 1 ACK for each direction;

4 segments: 1 FIN and 1 ACK for each direction;

1st. ACK+2nd. FIN combined.

1st. ACK+2nd. FIN combined.

nn

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 505: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

505

TCP Connection Release 3

TCP Connection Release 3

nn

Timers to avoid 2

Timers to avoid 2--army problem.army problem.

––

If response to FIN not received within 2*MSL,

If response to FIN not received within 2*MSL, FIN sender releases connection.FIN sender releases connection.

nn After connection released, TCP waits for After connection released, TCP waits for

2*MSL (e.g., 120 sec) to ensure all old

2*MSL (e.g., 120 sec) to ensure all old segments have aged.segments have aged.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 506: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

506

TCP Transmission 1

TCP Transmission 1

nn Sender process initiates connection.Sender process initiates connection.

nn Once connection established, TCP can start Once connection established, TCP can start sending data.sending data.

nn Sender writes bytes to TCP stream.Sender writes bytes to TCP stream.

nn TCP sender breaks byte stream into TCP sender breaks byte stream into segments.segments.

–– Each byte assigned sequence number.Each byte assigned sequence number.

–– Segment sent and timer started. Segment sent and timer started.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 507: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

507

TCP Transmission 2

TCP Transmission 2

nn If timer expires, retransmit segment.If timer expires, retransmit segment.

–– After retransmitting segment for maximum After retransmitting segment for maximum number of times, assumes connection is dead and number of times, assumes connection is dead and closes it.closes it.

nn If user aborts connection, sending TCP flushes If user aborts connection, sending TCP flushes its buffers and sends RESET segment.its buffers and sends RESET segment.

nn Receiving TCP decides when to pass received Receiving TCP decides when to pass received data to upper layer.data to upper layer.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 508: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

508

TCP Flow ControlTCP Flow Control

nn Sliding window.Sliding window.

–– Receiver’s Receiver’s advertised windowadvertised window..

»» Size of advertised window related to receiver’s Size of advertised window related to receiver’s buffer space.buffer space.

»» Sender can send data up to receiver’s advertised Sender can send data up to receiver’s advertised window.window.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 509: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

509

TCP Flow Control: ExampleTCP Flow Control: Example

2K;SEQ=0

ACK=2048; WIN=2048

2K; SEQ=2048

ACK=4096; WIN=0

ACK=4096; WIN=2048

1K; SEQ=4096

App. writes

2K of data

4K

2K

0

App. reads

2K of data

2K

1K

App. does

3K write

Senderblocked

Sendermay send up

to 2K

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 510: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

510

TCP Flow Control: Observations TCP Flow Control: Observations

nn TCP sender not required to transmit data as TCP sender not required to transmit data as soon as it comes in form application.soon as it comes in form application.

––

Example: when first 2KB of data comes in,

Example: when first 2KB of data comes in,

could wait for more data since window is 4KB.

could wait for more data since window is 4KB.

nn Receiver not required to send Receiver not required to send ACKsACKs as as soon as possible.soon as possible.

–– Wait for data so ACK is piggybacked.Wait for data so ACK is piggybacked.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 511: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

511

Delayed Delayed ACKsACKs

nn Tries to optimize ACK transmission.Tries to optimize ACK transmission.

nn Delay Delay ACKsACKs

and window update (500msec)

and window update (500msec) hoping to piggyback on data segment.hoping to piggyback on data segment.

nn Example: telnet to interactive editor:Example: telnet to interactive editor:––

Send 1 character at a time: 20

Send 1 character at a time: 20--

byte TCP header+ 1

byte TCP header+ 1--

byte data+20

byte data+20--byte IP header.byte IP header.

–– Receiver Receiver ACKsACKs

immediately: 40

immediately: 40--byte ACK.byte ACK.

––

When editor reads character, window update: 40

When editor reads character, window update: 40--byte byte datagram.datagram.

––

Then echoes character back: 41

Then echoes character back: 41--byte datagram.byte datagram.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 512: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

512

Nagle’s AlgorithmNagle’s Algorithm

nn Tries to optimize sending of small data Tries to optimize sending of small data chunks.chunks.

nn Example: telnet to interactive editor). Example: telnet to interactive editor).

–– Send first byte and buffer the rest until Send first byte and buffer the rest until outstanding byte is outstanding byte is ACKedACKed; then send all buffered ; then send all buffered data in one segment; buffer until next ACK. data in one segment; buffer until next ACK.

nn Disabled in some cases (e.g., window Disabled in some cases (e.g., window application: mouse movements).application: mouse movements).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 513: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

513

Silly Window SyndromeSilly Window Syndrome

nn Caused by receiver sending window updates of very Caused by receiver sending window updates of very small values.small values.

–– Example: Example:

»»

Receiver application reads 1 byte at a time and receiver TCP se

Receiver application reads 1 byte at a time and receiver TCP sends nds 11--byte window update.byte window update.

»»

Sender TCP has large blocks to send but can only send 1 byte at

Sender TCP has large blocks to send but can only send 1 byte at a a time.time.

nn Solution: [Clark] prevent receiver from generating Solution: [Clark] prevent receiver from generating small window advertisements; also, sender can wait.small window advertisements; also, sender can wait.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 514: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

514

Congestion ControlCongestion Control

nn Why do it at the transport layer?Why do it at the transport layer?

–– Real fix to congestion is to slow down sender.Real fix to congestion is to slow down sender.

nn Use law of “conservation of packets”.Use law of “conservation of packets”.

–– Keep number of packets in the network Keep number of packets in the network constant.constant.

–– Don’t inject new packet until old one leaves.Don’t inject new packet until old one leaves.

nn Congestion indicator: packet loss.Congestion indicator: packet loss.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 515: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

515

TCP Congestion Control 1

TCP Congestion Control 1

nn Like, flow control, also window based.Like, flow control, also window based.

–– Sender keeps Sender keeps congestion window (congestion window (cwincwin))..

––

Each sender keeps 2 windows: receiver’s

Each sender keeps 2 windows: receiver’s advertised window and congestion window.advertised window and congestion window.

–– Number of bytes that may be sent is Number of bytes that may be sent is min(advertised window, min(advertised window, cwincwin).).

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 516: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

516

TCP Congestion Control 2

TCP Congestion Control 2

nn

Slow start [Jacobson 1988]:

Slow start [Jacobson 1988]:

––

Connection’s congestion window starts at 1

Connection’s congestion window starts at 1 segment.segment.

–– If segment If segment ACKedACKed before time out, before time out, cwincwin

=cwin+1.

=cwin+1.

–– As As ACKsACKs come in, current come in, current cwincwin is increased is increased

by 1.

by 1.

–– Exponential increase. Exponential increase.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 517: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

517

TCP Congestion Control 3

TCP Congestion Control 3

nn Congestion Avoidance:Congestion Avoidance:

–– Third parameter: Third parameter: thresholdthreshold..

––

Initially set to 64KB.

Initially set to 64KB.

––

If timeout, threshold=cwin/2 and

If timeout, threshold=cwin/2 and cwincwin

=1.

=1.

–– ReRe--enters slowenters slow--start until start until cwincwin=threshold.=threshold.

–– Then, Then, cwincwin grows linearly until it reaches grows linearly until it reaches receiver’s advertised window.receiver’s advertised window.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 518: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

518

TCP Congestion Control: TCP Congestion Control: ExampleExample

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 519: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

519

TCP Retransmission TimerTCP Retransmission Timer

nn When segment sent, retransmission timer When segment sent, retransmission timer starts.starts.

–– If segment If segment ACKedACKed, timer stops., timer stops.

–– If time out, segment retransmitted and timer If time out, segment retransmitted and timer starts again.starts again.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 520: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

520

How to set timer?How to set timer?

nn Based on roundBased on round--trip time: time between a trip time: time between a segment is sent and ACK comes back.segment is sent and ACK comes back.

nn If timer is too short, unnecessary If timer is too short, unnecessary retransmissions.retransmissions.

nn If timer is too long, long retransmission If timer is too long, long retransmission delay.delay.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 521: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

521

Jacobson’s Algorithm 1

Jacobson’s Algorithm 1

nn Determining the roundDetermining the round--trip time:trip time:

–– TCP keeps TCP keeps RTTRTT variable. variable.

–– When segment sent, TCP measures how long it When segment sent, TCP measures how long it takes to get ACK back (takes to get ACK back (MM).).

––

RTT = alpha*RTT + (1

RTT = alpha*RTT + (1--alpha)M.alpha)M.

–– alpha: smoothing factor; determines weight alpha: smoothing factor; determines weight given to previous estimate.given to previous estimate.

––

Typically, alpha=7/8.

Typically, alpha=7/8.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 522: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

522

Jacobson’s Algorithm 2

Jacobson’s Algorithm 2

nn Determining timeout value:Determining timeout value:

–– Measure RTT variation, or |RTTMeasure RTT variation, or |RTT--M|.M|.

–– Keeps smoothed value of cumulative variation Keeps smoothed value of cumulative variation

D=alpha*D+(1

D=alpha*D+(1--alpha)|RTTalpha)|RTT--M|.M|.

–– Alpha may or may not be the same as value Alpha may or may not be the same as value used to smooth RTT.used to smooth RTT.

––

Timeout = RTT+4*D.

Timeout = RTT+4*D.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 523: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

523

Karn’sKarn’s AlgorithmAlgorithm

nn How to compute How to compute ACKsACKs for retransmitted for retransmitted segments? segments?

–– Count it for first or second transmission?Count it for first or second transmission?

–– KarnKarn proposed not to update RTT on any proposed not to update RTT on any retransmitted segment.retransmitted segment.

–– Instead RTT is doubled on each failure until Instead RTT is doubled on each failure until segments get through.segments get through.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 524: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

524

Persistence TimerPersistence Timer

nn Prevents deadlock if an window update Prevents deadlock if an window update

packet is lost and advertised window = 0.

packet is lost and advertised window = 0.

nn When persistence timer goes off, sender When persistence timer goes off, sender probes receiver; receiver replies with its probes receiver; receiver replies with its current advertised window.current advertised window.

nn

If 0, persistence timer is set again.

If 0, persistence timer is set again.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 525: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

525

KeepaliveKeepalive TimerTimer

nn Goes off when a connection is idle for a Goes off when a connection is idle for a long time.long time.

nn Causes one side to check whether the other Causes one side to check whether the other side is still alive.side is still alive.

nn If no answer, connection terminated. If no answer, connection terminated.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 526: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

526

TIME_WAITTIME_WAIT

nn

2*MSL.

2*MSL.

nn Makes sure all segments die after Makes sure all segments die after connection is closed.connection is closed.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 527: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

527

Wireless TCP 1

Wireless TCP 1

nn According to layered system design According to layered system design principles, transport protocol should be principles, transport protocol should be independent of underlying technology.independent of underlying technology.

nn However, wireless networks invalidate this However, wireless networks invalidate this principle.principle.

–– Ignoring properties of wireless medium can Ignoring properties of wireless medium can lead to poor TCP performance.lead to poor TCP performance.

–– Problem: TCP’s congestion control.Problem: TCP’s congestion control.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 528: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

528

Wireless TCP 2

Wireless TCP 2

nn Problem: packet loss as congestion Problem: packet loss as congestion indicator.indicator.

–– When retransmission timer times out, sender When retransmission timer times out, sender slows down.slows down.

nn Wireless links are Wireless links are lossylossy!!

–– Dealing with losses in this case should be reDealing with losses in this case should be re--sending lost segments sending lost segments asapasap..

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 529: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

529

Indirect TCP (IIndirect TCP (I--TCP)TCP)

nn [[BakneBakne and and BadrinathBadrinath

, 1995].

, 1995].

nn

Split TCP connection in 2: one from sender to base

Split TCP connection in 2: one from sender to base station and the other from base station to receiver.station and the other from base station to receiver.

–– Base station serves as “repeater”: copies segments Base station serves as “repeater”: copies segments between connections in both directions.between connections in both directions.

––

Connections are homogeneous; timeouts on 1st.

Connections are homogeneous; timeouts on 1st. connection, slow down sender.connection, slow down sender.

––

Problem: violates TCP’s e2e’ness.

Problem: violates TCP’s e2e’ness.nn Example: Example: ACKsACKs to sender mean base station received segments, not to sender mean base station received segments, not

necessarily receiver. necessarily receiver.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 530: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

530

Snoop TCPSnoop TCP

nn [[BalakrishnanBalakrishnan

et al., 1995].

et al., 1995].

nn Does not break connection. Does not break connection.

nn Modifications to base station’s network layer code.Modifications to base station’s network layer code.

–– Snooping agent on base station observes and caches TCP Snooping agent on base station observes and caches TCP segments sent to mobile host and segments sent to mobile host and ACKsACKs coming back.coming back.

–– If it doesn’t see an ACK for a segment or sees duplicate If it doesn’t see an ACK for a segment or sees duplicate ACKsACKs, it times out and retransmits., it times out and retransmits.

–– But source may time out anyway.But source may time out anyway.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 531: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

531

EndEnd--ToTo--End ArgumentEnd Argument

nn Design principle to help guide placement of Design principle to help guide placement of functionality in distributed systems.functionality in distributed systems.

nn Rationale for moving functions upward Rationale for moving functions upward closer to application.closer to application.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 532: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

532

Where to place distributed Where to place distributed systems functions?systems functions?

nn Layered system design:Layered system design:

–– Different levels of abstraction for simplicity.Different levels of abstraction for simplicity.

–– Lower layer provides service to upper layer.Lower layer provides service to upper layer.

–– Very well defined interfaces.Very well defined interfaces.

nn Some functions can be implemented at Some functions can be implemented at different layers or even at multiple layers.different layers or even at multiple layers.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 533: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

533

E2E Argument Statement

E2E Argument Statement

““The function in question can completely and The function in question can completely and correctly be implemented only with the correctly be implemented only with the knowledge and help of the application at the knowledge and help of the application at the endpoints. Therefore providing that function endpoints. Therefore providing that function in the communication system itself is not in the communication system itself is not possible. Sometimes an incomplete version possible. Sometimes an incomplete version of the function provided by the of the function provided by the communication system may be useful as communication system may be useful as performance enhancementperformance enhancement.”.”

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 534: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

534

Functions Closer to ApplicationFunctions Closer to Application

nn

E2E argument paper argues that functions should be

E2E argument paper argues that functions should be moved closer to the application that uses them.moved closer to the application that uses them.

nn Rationale:Rationale:

–– Some functions can only be completely and correctly Some functions can only be completely and correctly implemented with app’s knowledge.implemented with app’s knowledge.

»» Example: file transfer.Example: file transfer.

»» If error occurs in the network, network reliability can fix it.If error occurs in the network, network reliability can fix it.

»» Otherwise, only application can.Otherwise, only application can.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 535: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

535

Another perspective: CostAnother perspective: Cost

nn Why pay for something you don’t need.Why pay for something you don’t need.»»

Example 1: the Internet.

Example 1: the Internet.

»»

Example 2: trend in kernel design

Example 2: trend in kernel design -- take away from take away from kernel as much functionality as possible.kernel as much functionality as possible.

nn Applications that don’t need certain Applications that don’t need certain functions should not have to pay for them. functions should not have to pay for them.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 536: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

536

E2E Counter Argument

E2E Counter Argument

nn Performance!Performance!

–– Example: File transferExample: File transfer

»» Reliability checks at lower layers detect problems Reliability checks at lower layers detect problems earlier.earlier.

»» Abort transfer and reAbort transfer and re--try without having to wait till try without having to wait till whole file is transmitted.whole file is transmitted.

nn “Spread out” functionality across layers.“Spread out” functionality across layers.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 537: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

537

Domain Name System (DNS)Domain Name System (DNS)

nn Basic function: translation of names (ASCII Basic function: translation of names (ASCII strings) to network (IP) addresses and vicestrings) to network (IP) addresses and vice--versa.versa.

nn Example: Example:

–– zephyr.isi.eduzephyr.isi.edu <<--

> 128.9.160.160

> 128.9.160.160

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 538: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

538

HistoryHistory

nn

Original approach (ARPANET, 1970’s):

Original approach (ARPANET, 1970’s):

–– File File hosts.txt hosts.txt listed all hosts and their IP addresses.listed all hosts and their IP addresses.

–– Every night every host fetches file from central Every night every host fetches file from central repository.repository.

–– OK for a few hundred hosts.OK for a few hundred hosts.

–– Scalability?Scalability?

»» File size.File size.

»» Centrally managed.Centrally managed.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 539: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

539

DNSDNS

nn Hierarchical name space.Hierarchical name space.

nn Distributed database.Distributed database.

nn RFCsRFCs

1034 and 1035.

1034 and 1035.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 540: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

540

How is it used?How is it used?

nn ClientClient--server model.server model.

–– Client DNS (running on client hosts), or Client DNS (running on client hosts), or resolverresolver..

–– Application calls Application calls resolverresolver with name.with name.

–– ResolverResolver contacts local DNS server (using contacts local DNS server (using UDP) passing the name.UDP) passing the name.

–– Server returns corresponding IP address.Server returns corresponding IP address.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 541: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

541

DNS Name SpaceDNS Name Space

nn TreeTree--based hierarchy.based hierarchy.

int com edu gov mil org net us ca …

usc

cs ee

ibm

eng sales

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 542: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

542

Name Space StructureName Space Structure

nn TopTop--level domains:level domains:

–– Generic.Generic.

–– Countries.Countries.

nn Leaf domains: no subLeaf domains: no sub--domains.domains.

nn In practice all US organizations are under a In practice all US organizations are under a generic domain, while everything outside generic domain, while everything outside the US is under the corresponding country the US is under the corresponding country domain.domain.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 543: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

543

DNS NamesDNS Names

nn Domain names:Domain names:

–– Concatenation of all domain names starting from Concatenation of all domain names starting from its own all the way to the root separated by “.”.its own all the way to the root separated by “.”.

–– Refers to a tree node and all names under it.Refers to a tree node and all names under it.

–– Case insensitive.Case insensitive.

––

Components up to 63 characters.

Components up to 63 characters.

––

Full name less than 255 characters.

Full name less than 255 characters.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 544: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

544

Name Space ManagementName Space Management

nn Domains are autonomous.Domains are autonomous.

–– Organizational boundaries.Organizational boundaries.

–– Each domain manages its own name space Each domain manages its own name space independently of other domains.independently of other domains.

nn Delegation:Delegation:

–– When creating new domain: register with parent When creating new domain: register with parent domain.domain.

»» For name uniqueness.For name uniqueness.

»» For name resolution.For name resolution.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 545: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

545

Resource RecordsResource Records

nn Entry in the DNS database.Entry in the DNS database.

nn Several types of entries or Several types of entries or RRsRRs..

nn Example: RR “A” contains IP address.Example: RR “A” contains IP address.

nn Name <Name <--> several resource records.> several resource records.

nn RR format: fiveRR format: five--tupletuple..–– Name.Name.

–– TTL (in seconds).TTL (in seconds).

–– Class (usually “IN” for Internet info).Class (usually “IN” for Internet info).

–– Type: type of RR.Type: type of RR.

–– Value.Value.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 546: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

546

RR Types 1

RR Types 1

nn SOA: start of authority.SOA: start of authority.–– Marks beginning of zone’s database.Marks beginning of zone’s database.

–– Provides general info about the zone: eProvides general info about the zone: e--mail mail address of admin, default TTL, etc.address of admin, default TTL, etc.

nn A: address.A: address.––

Contains 32

Contains 32--bit IP address.bit IP address.

–– Single name <Single name <--> several A > several A RRsRRs..

nn MX: mail exchange.MX: mail exchange.–– Name of mail server for this domain.Name of mail server for this domain.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 547: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

547

RR Types 2

RR Types 2

nn NS: name server.NS: name server.–– Name of name server for this domain.Name of name server for this domain.

nn CNAME: canonical name.CNAME: canonical name.–– Alias.Alias.

nn HINFO: host description.HINFO: host description.–– Provides information about host, e.g., CPU type, OS, Provides information about host, e.g., CPU type, OS,

etc.etc.

nn TXT: arbitrary string of characters.TXT: arbitrary string of characters.–– Generic description of the domain, where it is located, Generic description of the domain, where it is located,

etc.etc.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 548: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

548

Name ServersName Servers

nn Entire database in a single name server.Entire database in a single name server.–– Practical?Practical?

–– Why?Why?

nn DNS database is partitioned into DNS database is partitioned into zoneszones..

nn Each zone contains part of the DNS tree.Each zone contains part of the DNS tree.

nn Zone <Zone <--> name server.> name server.––

Each zone may be served by more than 1 server.

Each zone may be served by more than 1 server.

–– A server may serve multiple zones.A server may serve multiple zones.

nn Primary and secondary name servers.Primary and secondary name servers.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 549: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

549

Name Resolution 1

Name Resolution 1

nn Application wants to resolve name.Application wants to resolve name.

nn ResolverResolver sends query to local name server.sends query to local name server.

–– ResolverResolver configured with list of local name servers.configured with list of local name servers.

–– Select servers in roundSelect servers in round--robin fashion.robin fashion.

nn If name is local, local name server returns matching If name is local, local name server returns matching authoritativeauthoritative RRsRRs..

–– AuthoritativeAuthoritative RR comes from authority managing the RR RR comes from authority managing the RR and is always correct.and is always correct.

–– CachedCached RRsRRs may be out of date.may be out of date.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 550: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

550

Name Resolution 2

Name Resolution 2

nn If information not available locally (not If information not available locally (not even cached), local NS will have to ask even cached), local NS will have to ask someone else.someone else.

–– It asks the server of the topIt asks the server of the top--level domain of the level domain of the name requested.name requested.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 551: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

551

Recursive ResolutionRecursive Resolution

nn Recursive query:Recursive query:–– Each server that doesn’t have info forwards it to Each server that doesn’t have info forwards it to

someone else.someone else.

–– Response finds its way back.Response finds its way back.

nn Alternative:Alternative:–– Name server not able to resolve query, sends back Name server not able to resolve query, sends back

the name of the next server to try.the name of the next server to try.

–– Some servers use this method.Some servers use this method.

–– More control for clients.More control for clients.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 552: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

552

ExampleExample

nn Suppose Suppose resolverresolver on on flits.cs.vu.nlflits.cs.vu.nl wants to resolve wants to resolve linda.cs.yale.edulinda.cs.yale.edu..–– Local NS, Local NS, cs.vu.nlcs.vu.nl, gets queried but cannot resolve it., gets queried but cannot resolve it.

–– It then contacts .It then contacts .eduedu server.server.

–– ..eduedu server forwards query to server forwards query to yale.eduyale.edu server.server.

–– yale.eduyale.edu contacts contacts cs.yale.educs.yale.edu, which has the authoritative , which has the authoritative RR.RR.

–– Response finds its way back to originator.Response finds its way back to originator.

–– cs.vu.nlcs.vu.nl caches this info.caches this info.»» Not authoritative (since may be outNot authoritative (since may be out--ofof--date).date).

»» RR TTL determines how long RR should be cached.RR TTL determines how long RR should be cached.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 553: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

553

Review 1

Review 1

nn NetworkNetwork--layer congestion control.layer congestion control.

–– What is it?What is it?

–– CC versus FC.CC versus FC.

–– Taxonomy: closed versus open loop.Taxonomy: closed versus open loop.

–– Open loop:Open loop:

»» Token and leaky bucket.Token and leaky bucket.

–– Closed loop:Closed loop:

»» Choke packets.Choke packets.

»» Fair and weighted fair queuing.Fair and weighted fair queuing.

»» Load shedding.Load shedding.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 554: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

554

Review 2

Review 2

nn Internetworking.Internetworking.

–– Gateways.Gateways.

–– Connectionless versus connectionConnectionless versus connection--oriented.oriented.

–– Tunneling.Tunneling.

–– Fragmentation.Fragmentation.

»» Transparent.Transparent.

»» NonNon--transparent.transparent.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 555: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

555

Review 3

Review 3

nn IP.IP.

–– IP header.IP header.

–– Addressing.Addressing.

–– Address formats.Address formats.

–– SubnettingSubnetting..

nn Companion protocols.Companion protocols.

–– ICMP, ARP, RARP, BOOTP.ICMP, ARP, RARP, BOOTP.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 556: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

556

Review 4

Review 4

nn Internet Routing.Internet Routing.

–– IGPsIGPs versus versus EGPsEGPs..

–– RIP, OSPF, BGP.RIP, OSPF, BGP.

–– Internet multicast.Internet multicast.

–– Mobile IP.Mobile IP.

nn CIDR.CIDR.

nn

IPv6.

IPv6.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 557: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

557

Review 5

Review 5

nn ATM network layer.ATM network layer.

nn Transport layer.Transport layer.–– Types of transport services.Types of transport services.

–– Transport service primitives.Transport service primitives.

–– Berkeley sockets.Berkeley sockets.

–– TPDUsTPDUs..

–– Connection management.Connection management.»» Setting up and releasing.Setting up and releasing.

»» Avoiding duplicates.Avoiding duplicates.

»» 33--way handshake.way handshake.

»» 22--army problem.army problem.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 558: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

558

Review 6

Review 6

nn UDP.UDP.

–– Type of service.Type of service.

–– Header.Header.

nn TCP.TCP.

–– Type of service.Type of service.

–– Header.Header.

–– Connection setup and release.Connection setup and release.

–– Flow control.Flow control.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 559: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

559

Review 7

Review 7

nn TCP (cont’d).TCP (cont’d).

–– Delayed Delayed ACKsACKs..

–– Nagle’s algorithm.Nagle’s algorithm.

–– Silly window syndrome.Silly window syndrome.

–– Congestion control.Congestion control.

nn Wireless TCP.Wireless TCP.

nn

E2E argument.

E2E argument.

nn The Web and HTTP.The Web and HTTP.

This watermark does not appear in the registered version - http://www.clicktoconvert.com

Page 560: Sharif University of Technologyce.sharif.edu/courses/84-85/2/ce342/resources/root... · 14 Network ArchitectureNetwork Architecture nProtocol layers: reduce design complexity. nMain

560

Review 8

Review 8

nn Network security.Network security.

nn Reliable multicast.Reliable multicast.

nn DNS.DNS.

This watermark does not appear in the registered version - http://www.clicktoconvert.com