EECB 473 DATA NETWORK ARCHITECTURE AND ELECTRONICS PREPARED BY JEHANA ERMY JAMALUDDIN Basic Packet Processing: Algorithms and Data Structures.

Slides:



Advertisements
Similar presentations
Discussion Monday ( ). ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live.
Advertisements

CPSC Network Layer4-1 IP addresses: how to get one? Q: How does a host get IP address? r hard-coded by system admin in a file m Windows: control-panel->network->configuration-
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
4 IP Address (IPv4)  A unique 32-bit number  Identifies an interface (on a host, on a router, …)  Represented in dotted-quad notation
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Network Layer Packet Forwarding IS250 Spring 2010
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
CSCI 4550/8556 Computer Networks Comer, Chapter 21: IP Encapsulation, Fragmentation, and Reassembly.
CS335 Networking & Network Administration Tuesday, May 11, 2010.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
1 Internet Networking Spring 2002 Tutorial 2 IP Checksum, Fragmentation.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Chapter 3 Review of Protocols And Packet Formats
ECE 526 – Network Processing Systems Design Packet Processing II: algorithms and data structures Chapter 5: D. E. Comer.
IP Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
Chapter 9 Classification And Forwarding. Outline.
Chapter 5 Basic Packet Processing: Algorithms And Data Structures
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Chapter 4 Queuing, Datagrams, and Addressing
More on the IP Internet Protocol. Internet Layer Process Transport layer process passes EACH TCP segment to the internet layer process for delivery Transport.
1 Chapter Internetworking Part 1 (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
FALL, 2005CSI Part 2.3 Internetworking & Addressing (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution Robert L. Probert, SITE,
Copyright © Lopamudra Roychoudhuri
Chapter 21: IP Encapsulation, Fragmentation & Reassembly
Transport Layer: TCP and UDP. Overview of TCP/IP protocols Comparing TCP and UDP TCP connection: establishment, data transfer, and termination Allocation.
ECE 526 – Network Processing Systems Design Networking: protocols and packet format Chapter 3: D. E. Comer Fall 2008.
ECE 526 – Network Processing Systems Design Packet Processing I: algorithms and data structures Chapter 5: D. E. Comer.
Review the key networking concepts –TCP/IP reference model –Ethernet –Switched Ethernet –IP, ARP –TCP –DNS.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Review: –Ethernet What is the MAC protocol in Ethernet? –CSMA/CD –Binary exponential backoff Is there any relationship between the minimum frame size and.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
Chapter 21 IP Encapsulation, Fragmentation, and Reassembly.
Networking Basics CCNA 1 Chapter 11.
1 CSE 5346 Spring Network Simulator Project.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Network Address Translation. 2 Network Address Translation (NAT) Extension of original addressing scheme Motivated by exhaustion of IP address space.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
Introduction to Networks
Data Communication and Networks
Computer Communication Networks
Chapter 4 Network Layer All material copyright
Chapter 4: Network Layer
Internet Networking Spring 2002
5 Network Layer Part II Computer Networks Tutun Juhana
Internetworking & Address Resolution
ECE 544 Protocol Design Project 2016
IP Forwarding Relates to Lab 3.
Internetworking Outline Best Effort Service Model
Wide Area Networks and Internet CT1403
IP Forwarding Relates to Lab 3.
Lecture 8: The Network Layer.
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
Network Layer: Control/data plane, addressing, routers
ITIS 6167/8167: Network and Information Security
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

EECB 473 DATA NETWORK ARCHITECTURE AND ELECTRONICS PREPARED BY JEHANA ERMY JAMALUDDIN Basic Packet Processing: Algorithms and Data Structures

Copying Used when packet moved from one memory location to another Expensive Must be avoided whenever possible  Leave packet in buffer  Pass buffer address among threads/layers

Buffer Allocation Possibilities  Large, fixed buffers  Variable-size buffers  Linked list of fixed-size blocks

Buffer Addressing Buffer address must be resolvable in all contexts Easiest implementation: keep buffers in kernel space

Integer Representation Two standards  Little endian (least-significant byte at lowest address)  Big endian (most-significant byte at lowest address)

Illustration Of Big And Little Endian Integers

Integer Conversion Needed when heterogeneous computers communicate Protocols define network byte order Computers convert to network byte order Typical library functions

Examples Of Algorithms Implemented With Software-Based Systems Layer 2  Ethernet bridge Layer 3  IP forwarding  IP fragmentation and reassembly Layer 4  TCP connection recognition and splicing Other  Hash table lookup

Why Study These Algorithms? Used between a pair of Ethernets Provides transparent connection Listens in promiscuous mode Forwards frames in both directions Uses addresses to filter

Bridge Filtering Uses source address in frames to identify computers on eachnetwork Uses destination address to decide whether to forward frame

Bridge Algorithm

Implementation Of Table Lookup Need high speed (more on this later) Software-based systems typically use hashing for table lookup

Hashing Optimizes number of probes Works well if table not full Practical technique: double hashing

Hashing Algorithm

Address Lookup Computer can compare integer in one operation Network address can be longer than integer (e.g., 48 bits) Two possibilities  Use multiple comparisons per probe  Fold address into integer key

Folding Maps N-bit value into M-bit key, M < N Typical technique: exclusive or Potential problem: two values map to same key Solution: compare full value when key matches

IP Forwarding Used in hosts as well as routers Conceptual mapping (next hop, interface) ¬ f(datagram, routing table) Table driven

IP Routing Table One entry per destination Entry contains  32-bit IP address of destination  32-bit address mask  32-bit next-hop address  N-bit interface number

Example IP Routing Table Values stored in binary Interface number is for internal use only Zero mask produces default route

IP Forwarding Algorithm

IP Fragmentation Needed when datagram larger than network MTU Divides IP datagram into fragments Uses FLAGS bits in datagram header

IP Fragmentation Algorithm (Part 1: Initialization)

IP Fragmentation Algorithm (Part 2: Processing)

Reassembly Complement of fragmentation Uses IP SOURCE ADDRESS and IDENTIFICATION fields in datagram header to group related fragments Joins fragments to form original datagram

Reassembly Algorithm

Data Structure For Reassembly Two parts  Buffer large enough to hold original datagram  Linked list of pieces that have arrived

TCP Connection Involves a pair of endpoints Started with SYN segment Terminated with FIN or RESET segment Identified by 4-tuple ( src addr, dest addr, src port, dest port )

TCP Connection Recognition Algorithm (Part 1)

TCP Connection Recognition Algorithm (Part 2)

TCP Splicing Join two TCP connections Allow data to pass between them To avoid termination overhead translate segment header fields  Acknowledgement number  Sequence number

Illustration Of TCP Splicing

TCP Splicing Algorithm (Part 1)

TCP Splicing Algorithm (Part 2)

Summary Packet processing algorithms include  Ethernet bridging  IP fragmentation and reassembly  IP forwarding  TCP splicing Table lookup important  Full match for layer 2  Longest prefix match for layer 3