Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 526 – Network Processing Systems Design Packet Processing II: algorithms and data structures Chapter 5: D. E. Comer.

Similar presentations


Presentation on theme: "ECE 526 – Network Processing Systems Design Packet Processing II: algorithms and data structures Chapter 5: D. E. Comer."— Presentation transcript:

1 ECE 526 – Network Processing Systems Design Packet Processing II: algorithms and data structures Chapter 5: D. E. Comer

2 Ning WengECE 5262 Goal and Outline Goal: ─ Understand basic network processing operations ─ Learn how to perform operations – data structures & algorithms Outline: ─ IP fragmentation and reassembly ─ IP forwarding and routing ─ TCP connection recognition and splicing ─ Summary ─ For next class

3 Ning WengECE 5263 IP Fragmentation Needed when datagram larger than network MTU ─ Ethernet 1500 Byte FLAGs bits in datagram header

4 Ning WengECE 5264 Fragmentation Example How to identify a fragment ─ Flags ─ Offset: multiple of 64 bit ─ Ident: unique to send machine

5 Ning WengECE 5265 IP Fragmentation Algorithm

6 Ning WengECE 5266 IP Reassembly Process to join fragments and produce original datagram Only ultimate destination perform IP reassembly (NAT: exception) Four factors influencing reassembly ─ Out of order delivery ─ Duplication ─ Loss ─ Concurrent reception Key fields help reassembly ─ Source IP address ─ ID field ─ Flags and Offset

7 Ning WengECE 5267 Reassembly Algorithm

8 Ning WengECE 5268 Reassembly Data Structure Two parts ─ Buffer larger enough to hold original datagram ─ Linked list of pieces that have arrived

9 Ning WengECE 5269 IP Datagram Forwarding Conceptual mapping ─ (next hop, interface)  f(datagram, routing table) Routing table ─ one entry per destination ─ entry contents: IP address, address mask, next-hop address and N-bit interface number Example IP routing table

10 Ning WengECE 52610 IP Forwarding Algorithm Assuming: routing table sorted from most specific to less specific Can I use hashing?

11 Ning WengECE 52611 High-Speed Forwarding Example routing tree

12 Ning WengECE 52612 Routing Exercises Draw tire of the following prefixes: ─ A: 0010* ─ B: 010* ─ C: 0101* ─ D: 0* ─ E: 10* ─ F: 1011* ─ G: 100* Which prefixes match the following lookups? ─ 01 ─ 101 ─ 0001 ─ 1

13 Ning WengECE 52613 TCP Connection Recognition Key function of traffic monitors, firewalls and NAT State of TCP connection ─ Being established ─ Completely established ─ Being terminated ─ Completely terminated (remove from record) Code bits in TCP header: ─ Reset: error occurred when one end has no record connection regarded as a completely terminated here ─ Syn: to start new connection completely established need “see” syn from both sides ─ Fin: to terminate connection completely terminated need “see” fin from both sides

14 Ning WengECE 52614 TCP Connection Recognition Algorithm

15 Ning WengECE 52615 TCP Splicing Join two TCP connections ─ Allow data to pass between them ─ To avoid termination overhead ─ By translating segment header fields Acknowledgment number; sequence number

16 Ning WengECE 52616 TCP Splicing Algorithm

17 Ning WengECE 52617 Summary Packet processing operations and algorithms ─ Ethernet bridging (layer 2) ─ IP fragmentation, reassembly and forwarding (layer 3) ─ TCP splicing, connection recognition (layer 4) ─ Flow classification (mixed layer) Important data structure ─ Linked list ─ Hashing table ─ Routing table ─ Tire Table lookup ─ Hashing ─ Full match for layer 2 ─ Longest prefix match (LPM) for layer 3

18 Ning WengECE 52618 For Next Class “Networking Algorithmics” ─ Chapter 17: Network Security (handout)

19 Ning WengECE 52619 Backup


Download ppt "ECE 526 – Network Processing Systems Design Packet Processing II: algorithms and data structures Chapter 5: D. E. Comer."

Similar presentations


Ads by Google