Title: Chapter 6 Packet Processing Functions
1Chapter 6Packet Processing Functions
2Outline
- 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
3Our Goal
- Identify functions that occur in packet
processing - Devise set of operations sufficient for all
packet processing - Find an efficient implementation for the
operations
4Packet 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
5Address Lookup And Packet Forwarding
- Forwardingthe 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
6Error Detection And Correction
- Most common forms
- Cyclic redundancy Check (CRC)
- Checksum
- Error checking can cause significant computation
overhead - CRCOften implemented with special-purpose
hardware - Checksumoffers an alternative optimizationincrem
ental 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
7An 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
8Fragmentation, 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
9Frame 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
10Packet 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
11Demultiplexing 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
12Optimized 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
13Classification 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)
14Queueing And Packet Discard
- QueueingThe 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
15Queueing 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
16Priority 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
17Weighted 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
18Weighted 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
19Packet Discard
- Refers to the policies and mechanisms used to
handle the problem - Tail dropdiscard 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 - TCPavoid 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
20Scheduling 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
21Security Authentication And Privacy
- Authentication mechanisms
- Ensure senders 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
22Traffic 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 designspeed - Cost is high if performed in real-time
23Traffic Shaping
- Make traffic conform to statistical bounds
- Typical use
- Smooth bursts
- Avoid packet trains
- Only possibilities
- Discard packets (seldom used)
- Delay packets
24Example 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
25Example 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
26Illustration Of Traffic Shaper
- Packets
- Arrive in bursts
- Leave at steady rate
Fordwards packets at a steady rate
Packet queue
Packetsleave
Packetsarrive
27Timer 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
28