Router Plugins (Formerly Crossbow) A Software Architecture for Next - - PowerPoint PPT Presentation

router plugins formerly crossbow
SMART_READER_LITE
LIVE PREVIEW

Router Plugins (Formerly Crossbow) A Software Architecture for Next - - PowerPoint PPT Presentation

Router Plugins (Formerly Crossbow) A Software Architecture for Next Generation Routers John DeHart jdd@arl.wustl.edu Washington January 9, 2001 Router Plugins (Crossbow) 1 WASHINGTON UNIVERSITY IN ST LOUIS Agenda 9:00 - 9:20


slide-1
SLIDE 1

January 9, 2001

Router Plugins (Crossbow)

1

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Router Plugins (Formerly Crossbow)

A Software Architecture for Next Generation Routers

John DeHart jdd@arl.wustl.edu

slide-2
SLIDE 2

January 9, 2001

Router Plugins (Crossbow)

2

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Agenda

9:00 - 9:20 Introduction (John) 9:20 - 10:00 NetBSD Kernel Topics (John) 10:00 - 10:30 Kernel Programming Guidelines (Fred) 10:30 - 10:45 Break 10:45 - 11:15 Router Plugins System Architecture (John) 11:15 - 11:45 The Anatomy of a Plugin (John) 11:45 - 12:00 Utilities (John) 12:00 - 12:15 Exercises (John) Distribution and Your Plans for Usage 12:15 - 1:15 Lunch (Brought in) 1:15 - 6:00 Exercises

slide-3
SLIDE 3

January 9, 2001

Router Plugins (Crossbow)

3

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Overview

  • Introduction
  • NetBSD Kernel Topics

– IP Processing – mbuf – Loadable Kernel Modules – Interrupts – Miscellaneous – Kernel Programming Guidelines: Fred

  • The Router Plugins system architecture
  • The architecture of a plugin
  • Utilities

– System Utilities (modstat, moduload, modload) – Crossbow Manager utility

slide-4
SLIDE 4

January 9, 2001

Router Plugins (Crossbow)

4

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Overview (continued)

  • Exercises

– Load an existing plugin and test

» For each packet received, prints “I got a packet”

– Modify plugin to print out UDP/IP info from select packets

» do using plugin code » do using filter manipulations

– Have plugin perform manipulation of packet payload

» print out packet payload information » perform a payload operation dependent on whats there

– Use plugin as two instances with different filters

» one instance for each of two different destination addresses

slide-5
SLIDE 5

January 9, 2001

Router Plugins (Crossbow)

5

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Acknowledgements

slide-6
SLIDE 6

January 9, 2001

Router Plugins (Crossbow)

6

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Cast of Thousands?

  • Dan Decasper
  • Ralph Keller
  • Hari Adiseshu
  • Fred Kuhns
  • Ken Wong
  • Sumi Choi
  • Tilman Wolf
  • Anshul Kantawala
  • Ed Spitznagel
  • John DeHart
  • Guru Parulkar
  • Bernie Plattner
  • Jon Turner
  • others I’m sure...

Special Thanks to: Ken Wong Fred Kuhns Anshul Kantawala Tilman Wolf Sumi Choi Jyoti Parwatikar Samphel Norden Ed Spitznagel

slide-7
SLIDE 7

January 9, 2001

Router Plugins (Crossbow)

7

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Introduction

slide-8
SLIDE 8

January 9, 2001

Router Plugins (Crossbow)

8

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Socket Layer

Example: Normal IP Processing

IP Queue IP Input IP Forward IP Output TCP Processing

IP IP IP IP IP IP

Vers HLen TOS ID Fragment Offset Source Address Destination Address Total length Flags TTL Protocol Header Checksum Source Port . . . Destination Port Packet Payload

IP

Is this packet for this Host? YES NO User Kernel

IP

Packet coming in on the wire Device Driver processing packet

IP IP

Device Driver puts packet in IP Input Queue

slide-9
SLIDE 9

January 9, 2001

Router Plugins (Crossbow)

9

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Socket Layer User Kernel TCP Processing

Example: IP Processing with a Plugin

IP

IP Queue

IP Input IP Output

IP IP IP IP IP IP

IP Forward

IP IP IP IP

Does this packet Match the Filter?

Vers HLen TOS ID Fragment Offset Source Address Destination Address Total length Flags TTL Protocol Header Checksum Source Port . . . Destination Port Packet Payload

Interface

IP

YES NO Gate Filter (Intf,P,SA,DA,SP,DP) Plugin Code

IP

slide-10
SLIDE 10

January 9, 2001

Router Plugins (Crossbow)

10

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Router Plugins

  • Router Plugins = = Crossbow

– Same thing, different name.

  • This is NOT Commercial Softare

– Expect some bugs

  • Router Plugins is Kernel level programming

– You will need root access

  • Currently works with NetBSD 1.4.1

– Moving to a new version of NetBSD takes about 2 weeks for us

» Right now, no plans to move

– Linux Port

» Attempted once » About 50% done » Person working on it has left. » Right now, no plans to continue the port

  • ANN: Active Network Node

– Not to be discussed in this Tutorial

slide-11
SLIDE 11

January 9, 2001

Router Plugins (Crossbow)

11

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Do Not Be Afraid

  • Read and Understand the kernel source code

– Not all of it, but some of it. Especially:

» the structure of the IP processing loop » mbuf data structure and processing

  • Buy a book

– Stevens is a good set of books for TCP/IP

  • Try things!!! EXPERIMENT!!

– If the kernel doesn’t crash or hang at least once, you aren’t trying hard enough

  • The Kernel is just another piece of software

– Yes, there are some special things about it but its just ‘C’ code – … and some assembly code … but you won’t need to touch that.

  • Programming at the kernel level takes a commitment

– Be ready to spend some time in the code

slide-12
SLIDE 12

January 9, 2001

Router Plugins (Crossbow)

12

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

… But, Be Cautious ...

  • Be able to get back to the original kernel code
  • Remember, plugins are not compiled in to the kernel

– a reboot will always remove them – modunload will remove them

  • Fred will present some other warnings and suggestions
slide-13
SLIDE 13

January 9, 2001

Router Plugins (Crossbow)

13

Washington

WASHINGTON UNIVERSITY IN ST LOUIS

Installing Router Plugins

  • New Kernel

– Router Plugins kernel source tree – Router Plugins (Crossbow) kernel configuration file

  • System Utilities that need to be rebuilt:

– source tree; make build – cm (crossbow manager)