chapter 6 packet processing functions

28
1 Chapter 6 Packet Processing Functions

Upload: ginger-brock

Post on 03-Jan-2016

79 views

Category:

Documents


5 download

DESCRIPTION

Chapter 6 Packet Processing Functions. Outline. Our Goal Packet Processing Address Lookup And Packet Forwarding Error Detection And Correction Fragmentation, Segmentation, And Reassembly Frame And Protocol Demultiplexing Packet Classification Queueing And Packet Discard - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 6 Packet Processing Functions

1

Chapter 6Packet Processing Functions

Page 2: Chapter 6 Packet Processing Functions

2

Outline

Our Goal Packet Processing

– Address Lookup And Packet Forwarding– Error Detection And Correction– Fragmentation, Segmentation, And Reassembly– Frame And Protocol Demultiplexing– Packet Classification– Queueing And Packet Discard– Scheduling And Timing– Security: Authentication And Privacy– Traffic Measurement And Policing– Traffic Shaping

Timer Management

Page 3: Chapter 6 Packet Processing Functions

3

Our Goal

Identify functions that occur in packet processing

Devise set of operations sufficient for all packet processing

Find an efficient implementation for the operations

Page 4: Chapter 6 Packet Processing Functions

4

Packet Processing

Address Lookup And Packet Forwarding Error Detection And Correction Fragmentation, Segmentation, And Reassembly Frame And Protocol Demultiplexing Packet Classification Queueing And Packet Discard Scheduling And Timing Security: Authentication And Privacy Traffic Measurement And Policing Traffic Shaping

Page 5: Chapter 6 Packet Processing Functions

5

Address Lookup And Packet Forwarding

Forwarding : the process of sending a packet on toward its destination

Two types– Exact match (typically layer 2)– Longest-prefix match (typically layer 3)

Cost depends on size of table and type of lookup

Page 6: Chapter 6 Packet Processing Functions

6

Error Detection And Correction

Most common forms :– Cyclic redundancy Check ( CRC )– Checksum

Error checking can cause significant computation overhead– CRC : Often implemented with special-purpose hardware– Checksum : offers an alternative optimization ~ incremental

update Error correction provides additional redundancy that can be

used to correct corrupted bits Values sent to perform error correction as known as Error

Correcting Codes ( ECCs ) - Audio & Video

Page 7: Chapter 6 Packet Processing Functions

7

An Important Note About Cost

The 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 8: Chapter 6 Packet Processing Functions

8

Fragmentation, Segmentation, And Reassembly

IP defines a fragmentation and reassembly ~ datagrams

ATM defines a segmentation and reassembly ~ AAL5 packets

Cost is high because– State must be kept and managed– Unreassembled fragments occupy memory

Page 9: Chapter 6 Packet Processing Functions

9

Frame And Protocol Demultiplexing

The concept pervades packet processing, and occurs at each layer of the stack

Type appears in each header– Assigned on output– Used on input to select ‘‘next’’ protocol

Cost of demultiplexing proportional to number of layers

Page 10: Chapter 6 Packet Processing Functions

10

Packet Classification

Mapping a packet to one of a finite set of flows or categories

Static Classification– TCP, UDP, ICMP, and other

Dynamically Classification– Use the IP source address in a packet to

determine the flow

Page 11: Chapter 6 Packet Processing Functions

11

Demultiplexing V.S. Classification

Demultiplexing – Always a stateless operation in the sense– Uses a global type system– Operates one layer at a time

Classification– Not guaranteed to be stateless – Does not need to use a global type system, and it

does require the sender to participate– Can span multiple layers of the stack

Page 12: Chapter 6 Packet Processing Functions

12

Optimized Packet Processing

Proponents of classification claim that its ability to bypass traditional layering gives classification potential for higher performance

Unlike a traditional layering scheme, where processing is restricted to a sequential tour through the layers, classification spans multiple layers in one step

Page 13: Chapter 6 Packet Processing Functions

13

Classification Languages

Designed to allow engineers to write packet classification rules that are precise and unambiguous

Agere Systems has designed a classification language named Functional Programming Language ( FPL )

Intel has adopted the Network Classification Language ( NCL )

Page 14: Chapter 6 Packet Processing Functions

14

Queueing And Packet Discard

Queueing : The policies, data structure, and algorithm related to storing and selection packets

General paradigm is store-and-forward– Incoming packet placed in queue– Outgoing packet placed in queue

In the simplest case, a queue is literally a First-In-First-Out ( FIFO )

When queue is full, choose packet to discard Affects throughput of higher-layer protocols

Page 15: Chapter 6 Packet Processing Functions

15

Queueing Priorities

Multiple queues used to enforce priority among packets

Incoming packet– Assigned priority as function of contents– Placed in appropriate priority queue

Queueing discipline– Examines priority queues– Chooses which packet to send

Page 16: Chapter 6 Packet Processing Functions

16

Priority Queueing

Assign unique priority number to each queue Choose packet from highest priority queue

that is nonempty Known as strict priority queueing Can lead to starvation

Page 17: Chapter 6 Packet Processing Functions

17

Weighted Round Robin (WRR)

Assign unique priority number to each queue Process all queues round-robin Compute N, max number of packets to select

from a queue proportional to priority Take up to N packets before moving to next

queue Works well if all packets equal size

Page 18: Chapter 6 Packet Processing Functions

18

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 19: Chapter 6 Packet Processing Functions

19

Packet Discard

Refers to the policies and mechanisms used to handle the problem

Tail drop : discard an arriving packet when memory is full Random Early Detection ( RED ): used a probabilistic

approach that increases the probability of discard as the memory fills

– TCP : avoid global synchronization of retransmission When discard an ATM cell, the Early Packet

Discard ( EPD ) technique identifies other cell that are part of the same packet, and discards all pieces at the same time

Page 20: Chapter 6 Packet Processing Functions

20

Scheduling And Timing

Important mechanisms Used to coordinate parallel and concurrent tasks

– Processing on multiple packets– Processing on multiple protocols– Multiple processors– Multiple interfaces

Scheduling is related to timer management, traffic shaping, and queueing

Scheduler attempts to achieve fairness

Page 21: Chapter 6 Packet Processing Functions

21

Security: Authentication And Privacy

Authentication mechanisms– Ensure sender’s identity

Confidentiality mechanisms– Ensure that intermediaries cannot interpret packet contents

~ Encryption

Authentication mechanisms also rely on encryption Note: in common networking terminology, privacy

refers to confidentiality– Example: Virtual Private Networks

Page 22: Chapter 6 Packet Processing Functions

22

Traffic Measurement And Policing

Used by network managers Can measure aggregate traffic or per-flow traffic Often related to Service Level Agreement (SLA) Traffic policing refer to active enforcement in which

traffic that exceeds specified bounds is marked as a candidate for discard or explicitly dropped

One aspect of traffic policing is important is system design : speed

Cost is high if performed in real-time

Page 23: Chapter 6 Packet Processing Functions

23

Traffic Shaping

Make traffic conform to statistical bounds Typical use

– Smooth bursts– Avoid packet trains

Only possibilities– Discard packets (seldom used)– Delay packets

Page 24: Chapter 6 Packet Processing Functions

24

Example Traffic Shaping Mechanisms-- Leaky bucket

Easy to implement Popular Sends steady number of packets per second Rate depends on number of packets waiting Does not guarantee steady data rate

Page 25: Chapter 6 Packet Processing Functions

25

Example Traffic Shaping Mechanisms-- Token bucket

Sends steady number of bits per second Rate depends on number of bits waiting Achieves steady data rate More difficult to implement

Page 26: Chapter 6 Packet Processing Functions

26

Illustration Of Traffic Shaper

Packets– Arrive in bursts– Leave at steady rate

XPacketsarrive

Packet queue

Fordwards packets at a steady rate

Packetsleave

Page 27: Chapter 6 Packet Processing Functions

27

Timer management

Fundamental piece of network system Needed for

– Scheduling– Traffic shaping– Other protocol processing (e.g., retransmission)

Cost– Depends on number of timer operations (e.g., set, cancel)– Can be high

Page 28: Chapter 6 Packet Processing Functions

28

QUESTION ?