EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

23
EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions

Transcript of EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Page 1: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

EECB 473 Data Network Architecture and Electronics

Lecture 3Packet Processing Functions

Page 2: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Aims of this lectureIdentify functions that occur in packet

processingDevise set of operations sufficient for all

packet processingFind an efficient implementation for the

operations

Page 3: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Packet Processing Functions We Will ConsiderAddress lookup and packet forwardingError detection and correctionFragmentation, segmentation, and

reassemblyFrame and protocol demultiplexingPacket classificationQueueing and packet discardScheduling and timingSecurity: authentication and privacyTraffic measurement, policing, and shaping

Page 4: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Address Lookup And Packet ForwardingForwarding requires address lookupLookup is table drivenTwo types

Exact match (typically layer 2)Longest-prefix match (typically layer 3)

Cost depends on size of table and type of lookup

Page 5: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Error Detection And CorrectionData sent with packet used as verification

ChecksumCRC

Cost proportional to size of packetOften implemented with special-purpose

hardware

Page 6: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

An Important Note About CostThe cost of an operation is proportional to the amount

of data processed. An operation such as checksum computation that requires examination of all the data in a packet is among the most expensive.

Page 7: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Fragmentation, Segmentation, And ReassemblyIP fragments and reassembles datagramsATM segments and reassembles AAL5

packetsSame idea; details differCost is high because

State must be kept and managedUnreassembled fragments occupy memory

Page 8: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Frame And Protocol DemultiplexingTraditional technique used in layered

protocolsType appears in each header

Assigned on outputUsed on input to select ‘‘next’’ protocol

Cost of demultiplexing proportional to number of layers

Page 9: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Packet ClassificationAlternative to demultiplexingCrosses multiple layersAchieves lower costMore on classification later in the course

which is inclusive ofStatic and Dynamic ClassificationDemultiplexing versus ClassificationOptimized Packet ProcessingClassification Languages

Page 10: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Queueing And Packet DiscardGeneral paradigm is store-and-forward

Incoming packet placed in queueOutgoing packet placed in queue

When queue is full, choose packet to discard

Affects throughput of higher-layer protocols

Page 11: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Queueing PrioritiesMultiple queues used to enforce priority

among packetsIncoming packet

Assigned priority as function of contentsPlaced in appropriate priority queue

Queueing disciplineExamines priority queuesChooses which packet to send

Page 12: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Examples Of Queueing DisciplinesPriority Queueing

Assign unique priority number to each queue

Choose packet from highest priority queue that is nonempty

Known as strict priority queueingCan lead to starvation

Page 13: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Examples Of Queueing Disciplines(continued)Weighted Round Robin (WRR)

Assign unique priority number to each queue

Process all queues round-robinCompute N, max number of packets to select

from a queue proportional to priorityTake up to N packets before moving to next

queueWorks well if all packets equal size

Page 14: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Examples Of Queueing Disciplines(continued)Weighted Fair Queueing (WFQ)

Make selection from queue proportional to priority

Use packet size rather than number of packets

Allocates priority to amount of data from a queue rather than number of packets

Page 15: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Scheduling And TimingImportant mechanismsUsed to coordinate parallel and concurrent

tasksProcessing on multiple packetsProcessing on multiple protocolsMultiple processors

Scheduler attempts to achieve fairness

Page 16: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Security: Authentication And PrivacyAuthentication mechanisms

Ensure sender’s identityConfidentiality mechanisms

Ensure that intermediaries cannot interpret packet contents

Note: in common networking terminology, privacy refers to confidentialityE.g. Virtual Private Networks

Page 17: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Traffic Measurement And PolicingUsed by network managersCan measure aggregate traffic or per-flow

trafficOften related to Service Level Agreement

(SLA)Cost is high if performed in real-time

Page 18: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Traffic ShapingMake traffic conform to statistical boundsTypical use

Smooth burstsAvoid packet trains

Only possibilitiesDiscard packets (seldom used)Delay packets

Page 19: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Example Traffic Shaping MechanismsLeaky bucket

Easy to implementPopularSends steady number of packets per secondRate depends on number of packets waitingDoes not guarantee steady data rate

Page 20: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Example Traffic Shaping Mechanisms(2)Token bucket

Sends steady number of bits per secondRate depends on number of bits waitingAchieves steady data rateMore difficult to implement

Page 21: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Illustration Of Traffic ShaperPackets

Arrive in burstsLeave at steady rate

Page 22: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

Timer ManagementFundamental piece of network systemNeeded for

SchedulingTraffic shapingOther protocol processing (e.g.,

retransmission)Cost

Depends on number of timer operations (e.g., set, cancel)

Can be high

Page 23: EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.

SummaryPrimary packet processing functions are

Address lookup and forwardingError detection and correctionFragmentation and reassemblyDemultiplexing and classificationQueueing and discardScheduling and timingSecurity functionsTraffic measurement, policing, and shaping