ECE 526 - PowerPoint PPT Presentation

About This Presentation
Title:

ECE 526

Description:

ECE 526 Network Processing Systems Design Packet Processing I: algorithms and data structures Chapter 5: D. E. Comer Ning Weng ECE 526 * Goals Understand basic ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 19
Provided by: Ning154
Learn more at: http://www.engr.siu.edu
Category:
Tags: ece | blocks | buffering

less

Transcript and Presenter's Notes

Title: ECE 526


1
ECE 526 Network Processing Systems Design
  • Packet Processing I  algorithms and data
    structures
  • Chapter 5 D. E. Comer

2
Goals
  • Understand basic packet processing operations
  • Learn how to design efficient network processing
    system by
  • Optimized data structures
  • Optimized processing algorithms
  • Get ready for Lab1

3
Outline
  • Packet processing data structures
  • Data storage
  • Linked list
  • http//cslibrary.stanford.edu/103/LinkedListBasics
    .pdf
  • Hash
  • http//en.wikipedia.org/wiki/Hash_table
  • Packet processing algorithms
  • Ethernet bridge
  • Table lookup and hashing (used for lab1)
  • Packet flow classification (used for lab1)
  • IP forwarding, fragmentation and reassembly --
    next
  • TCP connection recognition and splicing - next
  • Lab 1

4
Data Storage coping buffering
  • Used when packet moved from one memory location
    to another for protocol processing
  • Expensive, why?
  • What can be done to reduce buffer copies?
  • Must be avoided whenever possible
  • Leave packet in buffer
  • Pass buffer address among threads/layers
  • Buffer allocation
  • Large, fixed buffer
  • Varied-size buffers
  • Linked list of fixed-size blocks
  • What size should buffers be?

5
Buffer Sizes
  • Max IP packet size is 64KB (total length field in
    IP format 16 bit)
  • Almost no packets larger than 1500 bytes

6
Ethernet Bridge
  • Used between a pair of Ethernets
  • Provides transparent connections
  • Listens in promiscuous mode
  • Forwards frames in both directions
  • Uses source address in frames to identify
    computers on each network
  • Uses addresses to filter
  • Uses destination address to decide whether to
    forward frame

7
Learning Bridge Algorithm
Forwarding unless the destination is known lie on
the segment over which frames arrives
8
Hash Table Lookup
  • Table lookup
  • Need high speed
  • Software-based systems use hashing for table
    lookup
  • Hashing
  • Scheme for providing rapid access to data items
    which are distinguished by some key
  • Hash table and hash function
  • Hashing function
  • Function assigns a data item distinguished by
    some key into one of a number of possible hash
    buckets in a hash table
  • Ideal hash function should distribute items
    evenly between the buckets
  • Hashing collision
  • Two different items hash to the same location in
    a hash table
  • Double hashing one of popular collision
    resolution technique
  • Two values one as a starting value and one as
    interval between successive values

9
Hashing Algorithm
10
Packet Classification
  • Process of mapping a packet to one of the finite
    sets of flows or categories
  • Flow set of packets that share common
    characteristics, for example
  • to the same destination
  • use the same procedure to process
  • Packets can be classified according to packet
    header information

11
Example Web Traffic
  • Ethernet frame contains IP datagram
  • IP datagram contains TCP segment
  • TCP segment has destination port 80 (HTTP)

12
Flow Creation
  • 5-tuple most commonly used version (also for
    lab1)

13
Flow Creation major steps
  • Extract the five tuples from packet header
  • Calculate the hash value of the five tuples using
    function
  • Follows the concept of hashing algorithm
  • to find the right slot either empty or the one
    has the same hashing value but also same five
    tuples
  • different way to compute hash value
  • different way to resolve the collision

14
Lab 1
  • TCP/IP flow identification
  • Your program should read a trace of packets and
    tell the following statistics at the end of the
    run
  • Number of flows observed. That is the number of
    unique 5-tuples consisting of IP source and
    destination, layer 4 protocol number, and source
    and destination ports.
  • We provide you with support functions to read and
    write packet trace
  • You just need to write partial packet processing
    code based on the guidance.

15
Lab 1
  • Modify file flowid.c only
  • Three key functions
  • Init_flowid()
  • Initialize any data structures that you need
  • You dont need modify it, but you need understand
    it
  • Int flowid(packet pass_packet)
  • Packet processing code
  • You need modify the partial code
  • Finish_flowid()
  • Called at the end of trace, so you can output
    results
  • You need modify this code

16
Lab 1 Help
  • Help
  • Dr. Weng Office Hours (MW 230 pm to 330 pm)
  • TAs Kajal P. Patil and Mini Mathew
    kajal_at_siu.edu, mini10_at_siu.edu
  • Help Hours Tu 1100am-100pm Tr 930-1130am
    and Fr 1-3pm

17
For Next Class
  • Read Comer Chapter 5

18
Quiz
  • Note (Please write clearly as you can only a
    few key words required for each question)
  • Why packet processing is more and more important
    compared with other sources of packet delay?
    Hint think about the technology/application
    trend, and the way to reduce each of them.
  •  Why is hashing table efficient for table lookup?
    Can hashing table be used for layer 2 lookup? How
    about for layer 3? Please explain to support why
    and why not. 
  • What is the basic idea of optimize NIC? List of
    three techniques of using this idea.
Write a Comment
User Comments (0)
About PowerShow.com