290 likes | 496 Views
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
E N D
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
Priority Queueing • Assign unique priority number to each queue • Choose packet from highest priority queue that is nonempty • Known as strict priorityqueueing • Can lead to starvation
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
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
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
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
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, privacyrefers to confidentiality • Example: Virtual Private Networks
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
Traffic Shaping • Make traffic conform to statistical bounds • Typical use • Smooth bursts • Avoid packet trains • Only possibilities • Discard packets (seldom used) • Delay packets
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
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
X Illustration Of Traffic Shaper • Packets • Arrive in bursts • Leave at steady rate Fordwards packets at a steady rate Packet queue Packetsleave Packetsarrive
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