router plugins formerly crossbow
play

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


  1. 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

  2. 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 Washington January 9, 2001 Router Plugins (Crossbow) 2 WASHINGTON UNIVERSITY IN ST LOUIS

  3. 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 Washington January 9, 2001 Router Plugins (Crossbow) 3 WASHINGTON UNIVERSITY IN ST LOUIS

  4. 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 Washington January 9, 2001 Router Plugins (Crossbow) 4 WASHINGTON UNIVERSITY IN ST LOUIS

  5. Acknowledgements Washington January 9, 2001 Router Plugins (Crossbow) 5 WASHINGTON UNIVERSITY IN ST LOUIS

  6. Cast of Thousands? • Dan Decasper Special Thanks to: • Ralph Keller Ken Wong • Hari Adiseshu Fred Kuhns • Fred Kuhns Anshul Kantawala • Ken Wong Tilman Wolf • Sumi Choi Sumi Choi • Tilman Wolf Jyoti Parwatikar • Anshul Kantawala Samphel Norden • Ed Spitznagel Ed Spitznagel • John DeHart • Guru Parulkar • Bernie Plattner • Jon Turner • others I’m sure... Washington January 9, 2001 Router Plugins (Crossbow) 6 WASHINGTON UNIVERSITY IN ST LOUIS

  7. Introduction Washington January 9, 2001 Router Plugins (Crossbow) 7 WASHINGTON UNIVERSITY IN ST LOUIS

  8. Example: Normal IP Processing Is this packet for this Host? Socket User Layer Vers HLen TOS Total length Kernel ID Flags Fragment Offset Protocol TTL Header Checksum Source Address Destination Address Source Port Destination Port TCP Processing . . . Packet Payload IP Input IP Forward IP Output YES IP IP IP IP IP NO IP IP Queue IP IP IP IP Device Driver puts packet in IP Input Queue Device Driver processing packet Packet coming in on the wire Washington January 9, 2001 Router Plugins (Crossbow) 8 WASHINGTON UNIVERSITY IN ST LOUIS

  9. Example: IP Processing with a Plugin Does this packet Match the Filter? Vers HLen TOS Total length ID Flags Fragment Offset Socket User Protocol TTL Header Checksum Layer Kernel Source Address Destination Address Source Port Destination Port . . . Packet Payload TCP Processing Filter (Intf,P,SA,DA,SP,DP) IP IP Input IP Forward Output NO IP IP IP IP IP IP IP IP Gate YES Plugin IP IP Queue Code IP IP Interface IP IP Washington January 9, 2001 Router Plugins (Crossbow) 9 WASHINGTON UNIVERSITY IN ST LOUIS

  10. 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 Washington January 9, 2001 Router Plugins (Crossbow) 10 WASHINGTON UNIVERSITY IN ST LOUIS

  11. 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 Washington January 9, 2001 Router Plugins (Crossbow) 11 WASHINGTON UNIVERSITY IN ST LOUIS

  12. … 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 Washington January 9, 2001 Router Plugins (Crossbow) 12 WASHINGTON UNIVERSITY IN ST LOUIS

  13. 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) Washington January 9, 2001 Router Plugins (Crossbow) 13 WASHINGTON UNIVERSITY IN ST LOUIS

Recommend


More recommend