73ab235b7e65ce761bb879c8fa8e20d9.ppt
- Количество слайдов: 13
Router Plugins (Formerly Crossbow) A Software Architecture for Next Generation Routers John De. Hart jdd@arl. wustl. edu January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 1
Agenda 9: 00 9: 20 10: 00 10: 30 10: 45 (John) 11: 15 11: 45 12: 00 12: 15 1: 15 January 9, 2001 9: 20 10: 00 10: 30 10: 45 11: 15 Introduction (John) Net. BSD Kernel Topics (John) Kernel Programming Guidelines (Fred) Break Router Plugins System Architecture 11: 45 The Anatomy of a Plugin (John) 12: 00 Utilities (John) 12: 15 Exercises (John) Distribution and Your Plans for Usage 1: 15 Lunch (Brought in) 6: 00 Exercises Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 2
Overview • Introduction • Net. BSD 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 January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 3
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 January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 4
Acknowledgements January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 5
Cast of Thousands? • • • • Dan Decasper Ralph Keller Hari Adiseshu Fred Kuhns Ken Wong Sumi Choi Tilman Wolf Anshul Kantawala Ed Spitznagel John De. Hart Guru Parulkar Bernie Plattner Jon Turner others I’m sure. . . January 9, 2001 Special Thanks to: Ken Wong Fred Kuhns Anshul Kantawala Tilman Wolf Sumi Choi Jyoti Parwatikar Samphel Norden Ed Spitznagel Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 6
Introduction January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 7
Example: Normal IP Processing Is this packet for this Host? Socket Layer Vers HLen TOS Total length ID Flags Fragment Offset Protocol Header Checksum Source Address Destination Address Source Port Destination Port TCP Processing. . . Packet Payload User Kernel TTL IP Input YES IP IP Output IP IP IP Forward IP IP NO IP Queue IP IP IP January 9, 2001 Device Driver processing packet Queue Packet coming in on the Input Device Driver puts packet in IP wire Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS IP 8
Example: IP Processing with a Plugin Does this packet Match the Filter? Vers HLen TOS Total length ID Flags Fragment Offset Socket Protocol TTL Header Checksum Layer Source Address Destination Address Source Port Destination Port. . . Packet Payload User Kernel TCP Processing IP Filter (Intf, P, SA, DA, SP, DP) Input IP Forward IP IP IP NO IP IP IP Queue IP Gate YES Interface Plugin IP Code IP Output IP IP January 9, 2001 IP Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 9
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 Net. BSD 1. 4. 1 – Moving to a new version of Net. BSD 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 January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 10
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 January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 11
… 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 January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 12
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) January 9, 2001 Router Plugins (Crossbow) Washington WASHINGTON UNIVERSITY IN ST LOUIS 13
73ab235b7e65ce761bb879c8fa8e20d9.ppt