Michaelmas 2009Building an Internet Router (P33)Handout 1 1 Building an Internet Router (P33) Handout 1: What’s a router? Class project and logistics Dr.

Slides:



Advertisements
Similar presentations
Network Layer Delivery Forwarding and Routing
Advertisements

Computer Networks TCP/IP Protocol Suite.
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 2 Getting Started.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
BASIC SKILLS AND TOOLS USING ACCESS
OSPF 1.
Router Internals CS 4251: Computer Networking II Nick Feamster Spring 2008.
1 Building a Fast, Virtualized Data Plane with Programmable Hardware Bilal Anwer Nick Feamster.
Router Internals CS 4251: Computer Networking II Nick Feamster Fall 2008.
Document #07-2I RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) (mod 7/25 & clean-up 8/20) Customer Supplier.
1 Hyades Command Routing Message flow and data translation.
1 Linux IP Masquerading Brian Vargyas XNet Information Systems.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
© Telcordia Technologies 2004 – All Rights Reserved AETG Web Service Tutorial AETG is a service mark of Telcordia Technologies. Telcordia Technologies.
2010 Labs & Tools for ITE 1 Gratitude Kudyachete, Manager - SSA CATC Lab Tools for IT E 4.1.
IP Router Architectures. Outline Basic IP Router Functionalities IP Router Architectures.
Chapter 1: Introduction to Scaling Networks
Professor Yashar Ganjali Department of Computer Science University of Toronto
Local Area Networks - Internetworking
What is access control list (ACL)?
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 The OSI Model and the TCP/IP.
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Health Artifact and Image Management Solution (HAIMS)
Chapter 20 Network Layer: Internet Protocol
1..
1 Internet Protocol: Routing IP Datagrams D. E. Comer, “Internetworking with TCP/IP: Principles, Protocols and Architectures”, Ch. 8, Prentice Hall, 2000.
31242/32549 Advanced Internet Programming Advanced Java Programming
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.1 Module 10 Routing Fundamentals and Subnets.
Services Course Windows Live SkyDrive Participant Guide.
1 How Do I Order From.decimal? Rev 05/04/09 This instructional training document may be updated at anytime. Please visit and check the.
1 BRState Software Demonstration. 2 After you click on the LDEQ link to download the BRState Software you will get this message.
Macromedia Dreamweaver MX 2004 – Design Professional Dreamweaver GETTING STARTED WITH.
IG Pro & CMS.
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v2.2—5-1 MPLS VPN Implementation Configuring BGP as the Routing Protocol Between PE and CE Routers.
Chapter 10: The Traditional Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
PSSA Preparation.
CMSC433 Solving Project 0 Getting started with BitBucket, Git and Eclipse CMSC433 - Programming Language Technologies and Paradigms (Spring 2012)
Profile. 1.Open an Internet web browser and type into the web browser address bar. 2.You will see a web page similar to the one on.
TIDE Presentation Florida Standards Assessments 1 FSA Regional Trainings Updated 02/09/15.
TCP/IP Protocol Suite 1 Chapter 18 Upon completion you will be able to: Remote Login: Telnet Understand how TELNET works Understand the role of NVT in.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Link-State Routing Protocols Routing Protocols and Concepts – Chapter.
Scalable Rule Management for Data Centers Masoud Moshref, Minlan Yu, Abhishek Sharma, Ramesh Govindan 4/3/2013.
The Project Please read the project’s description first. Each router will have a unique ID, with your router’s ID of 0 Any two connected routers will have.
NetFPGA Project: 4-Port Layer 2/3 Switch Ankur Singla Gene Juknevicius
Berlin – November 10th, 2011 NetFPGA Programmable Networking for High-Speed Network Prototypes, Research and Teaching Presented by: Andrew W. Moore (University.
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Introduction.
CS 838: NetFPGA Tutorial Theophilus Benson.
Aug 20 th, 2002 Sigcomm Education Workshop 1 Teaching tools for a network infrastructure teaching lab The Virtual Router and NetFPGA Sigcomm Education.
Paper Review Building a Robust Software-based Router Using Network Processors.
NetFPGA: Reusable Router Architecture for Experimental Research Jad Naous, Glen Gibb, Sara Bolouki, and Nick Presented.
Professor Yashar Ganjali Department of Computer Science University of Toronto
PA3: Router Junxian (Jim) Huang EECS 489 W11 /
NetFPGA Tsinghua Tutorial May S T A N F O R D U N I V E R S I T Y NetFPGA Tutorial Tsinghua University – Day 2 Presented by: James Hongyi.
NetFPGA Cambridge Spring School Mar Day 2: NetFPGA Cambridge Spring School Module Development and Testing Presented by: Andrew W. Moore and.
IP Forwarding.
Applied research laboratory David E. Taylor Users Guide: Fast IP Lookup (FIPL) in the FPX Gigabit Kits Workshop 1/2002.
NetFPGA Cambridge Workshop Sep Day 2: NetFPGA Cambridge Workshop Module Development and Testing Presented by: Andrew W. Moore and David Miller.
CS/CoE 536 : Lockwood 1 CS/CoE 536 Reconfigurable System On Chip Design Lecture 4 : Demonstration of Machine Problem 1 : CAM-based Firewall Washington.
Networks and Protocols CE Week 7b. Routing an Overview.
Addressing: Router Design
Reference Router on NetFPGA 1G
Packet Switch Architectures
Implementing an OpenFlow Switch on the NetFPGA platform
IP Forwarding Relates to Lab 3.
Reference Router on NetFPGA 1G
NetFPGA - an open network development platform
Packet Switch Architectures
Presentation transcript:

Michaelmas 2009Building an Internet Router (P33)Handout 1 1 Building an Internet Router (P33) Handout 1: What’s a router? Class project and logistics Dr Andrew W. Moore Thank you supporters:

Michaelmas 2009Building an Internet Router (P33)Handout 1 2 Some logistics Web page: TAs: David Miller (Hardware) Stephen Kell (Software) Hot-spare TAs: Phil Watts (Hardware) Chris Smowton (Software) Grades: Mphil (ACS) – Pass / Fail - based on a mark out of 100 All others (DTC) – Mark out of 100

3 Some more logistics Class Mailing list: think of this as a self-help mailing list for all of you Staff Mailing list: Submission mail: Group aliases can appear if you require them.

4 What is Routing? R3 A B C R1 R2 R4D E F R5 F R3E D Next HopDestination D

5 What is Routing? R3 A B C R1 R2 R4D E F R5 F R3E D Next HopDestination D Data Options (if any) Destination Address Source Address Header ChecksumProtocolTTL Fragment Offset Flags Fragment ID Total Packet LengthT.ServiceHLenVer 20 bytes

6 What is Routing? A B C R1 R2 R3 R4D E F R5

7 Points of Presence (POPs) A B C POP1 POP3 POP2 POP4 D E F POP5 POP6 POP7 POP8

8 Where High Performance Routers are Used R10 R11 R4 R13 R9 R5 R2 R1 R6 R3 R7 R12 R16 R15 R14 R8 (10 Gb/s)

9 What a Router Looks Like Cisco CSR-1Juniper T320 6ft 19” 2ft Capacity: 92Tb/s Power: 4.7kW 3ft 2.5ft 19” Capacity: 320Gb/s Power: 2.9kW

10 Basic Architectural Components of an IP Router Control Plane Datapath per-packet processing Switching Forwarding Table Routing Table Routing Protocols Management & CLI Software Hardware

11 Per-packet processing in an IP Router 1. Accept packet arriving on an incoming link. 2. Lookup packet destination address in the forwarding table, to identify outgoing port(s). 3. Manipulate packet header: e.g., decrement TTL, update header checksum. 4. Send packet to the outgoing port(s). 5. Buffer packet in the queue. 6. Transmit packet onto outgoing link.

12 Generic Router Architecture Lookup IP Address Update Header Header Processing DataHdrDataHdr ~1M prefixes Off-chip DRAM Address Table Address Table IP AddressNext Hop Queue Packet Buffer Memory Buffer Memory ~1M packets Off-chip DRAM

13 Generic Router Architecture Lookup IP Address Update Header Header Processing Address Table Address Table Lookup IP Address Update Header Header Processing Address Table Address Table Lookup IP Address Update Header Header Processing Address Table Address Table DataHdrDataHdrDataHdr Buffer Manager Buffer Memory Buffer Memory Buffer Manager Buffer Memory Buffer Memory Buffer Manager Buffer Memory Buffer Memory DataHdrDataHdrDataHdr

14 The P33 Project: Build a 4-port x 1GE Router Switching Forwarding Table Routing Table Routing Protocols Management & CLI Software Hardware Software Team Develop s/w in Linux on PC in lab Hardware Team Develop h/w in Verilog on NetFPGA board in lab Exception Processing

15 software hardware Switching Forwarding Table Routing Table Routing Protocols Management & CLI Exception Processing Interoperability Build basic routerRouting Protocol (PWOSPF) Integrate with H/W Emulated h/w in VNS Routing Table Routing Protocols Management & CLI Exception Processing Emulated h/w in VNS Routing Table Routing Protocols Management & CLI Exception Processing Emulated h/w in VNS Routing Table Routing Protocols Management & CLI Exception Processing Command Line Interface Wow us! Innovate and add! Presentations Judges 4-port non-learning switch 4-port learning switch IPv4 router forwarding path Integrate with S/W Interoperability Wow us! Switching Forwarding Table Learning Environment Modular design Testing 21/Oct28/Nov5/Nov11/Nov18/Nov10/Jan 21/Oct28/Nov5/Nov 18/Nov11/Nov10/Jan

FPGA Memory 1GE What is the NetFPGA? PCI CPU Memory NetFPGA Board PC with NetFPGA Networking Software running on a standard PC A hardware accelerator built with Field Programmable Gate Array driving Gigabit network links

FPGA Memory 1GE Running the Router Kit User-space development, 4x1GE line-rate forwarding PCI CPU Memory PW-OSPF user kernel Routing Table IPv4 Router 1GE Fwding Table Packet Buffer Exception Processing Management (including CLI) “Mirror”

18 Next steps  Explore the web page (  Decide if you still want to take the class  Build a team of 3 people: 2 s/w and 1 h/w  Come to SW02 on Tuesday 10am… We will meet with you every week during class time.

Using the nf-test machines  Each group is allocated an nf-test machine {nf-test1,nf-test2,nf-test3,...}.nf.cl.cam.ac.uk  These machines are headless (no KVM) and located in SW02 (alcove)  Login via ssh; set your own password and go We suggest running “ vncserver ” and then using “ vncviewer ”; as a useful way to leave jobs/desktop running and reconnect if you need to move location.  SW02 is a busy classroom – please respect others If you need to gain physical access to an nf-test machine Do it quietly! You maybe refused entry in the afternoons – don’t take it personally.

nf-test machine rules  Abuse the machines – that’s the end of this module for you – zero tolerance policy.  only connect eth0 to the cisco (access) switch  these machines run a firewall for a reason  if it doesn’t work for you, lets fix the rules  Play nicely with each other; your interoperability marks depend on it.

nf-test machine information  Warning: Files stored on nf-test machines are not backed up - and may be lost at any time.  You must make sure that you regularly copy your files into your REAL (computer laboratory) home directory as a back-up  Machines fail – they usually fail 24 hours before the big deadline!

Building an Internet Router (P33) Michaelmas Tree Structure NF2 bin lib projects bitfiles (scripts for running simulations and setting up the environment) (contains the bitfiles for all projects that have been synthesized) (stable common modules and common parts needed for simulation/synthesis/design) (user projects, including reference designs)

Building an Internet Router (P33) Michaelmas Tree Structure (2) lib C java Makefiles Perl5 python scripts verilog (common software and code for reference designs) (contains software for the graphical user interface) (makefiles for simulation and synthesis) (common libraries to interact with reference designs and aid in simulation) (common libraries to aid in regression tests) (scripts for common functions) (modules and files that can be reused for design)

Building an Internet Router (P33) Michaelmas Tree Structure (3) projects doc include regress src sw synth verif (project specific documentation) (contains file to include verilog modules from lib, and creates project specific register defines files) (regression tests used to test generated bitfiles) (contains non-library verilog code used for synthesis and simulation) (all software parts of the project) (contains user.xco files to generate cores and Makefile to implement the design) (simulation tests)

Building an Internet Router (P33) Michaelmas State Diagram to Verilog (1) MAC RxQ MAC RxQ CPU RxQ CPU RxQ MAC RxQ MAC RxQ CPU RxQ CPU RxQ MAC RxQ MAC RxQ CPU RxQ CPU RxQ MAC RxQ MAC RxQ CPU RxQ CPU RxQ Input Arbiter Output Port Lookup MAC TxQ MAC TxQ CPU TxQ CPU TxQ MAC TxQ MAC TxQ CPU TxQ CPU TxQ MAC TxQ MAC TxQ CPU TxQ CPU TxQ MAC TxQ MAC TxQ CPU TxQ CPU TxQ Output Queues

Building an Internet Router (P33) Michaelmas Inter-module Communication data ctrl wr rdy

Building an Internet Router (P33) Michaelmas State Diagram to Verilog (2) Projects: –Each design represented by a project Format: NF2/projects/ e.g., NF2/projects/bir_starter –Consists of: –What is Missing? refer to the web page “Implement four port hard-wired switch” is the start. Verilog source Simulation tests Hardware tests Libraries Optional software

Building an Internet Router (P33) Michaelmas State Diagram to Verilog (3) Projects (cont): –Pull in modules from NF2/lib/verilog Generic modules that are re-used in multiple projects Specify shared modules in project’s include/lib_modules.txt –Local src modules override shared modules –bir_starter: Local in_arb_regs.v input_arbiter.v output_port_lookup.v Everything else: shared modules

Building an Internet Router (P33) Michaelmas Testing: Simulation (1) Simulation allows testing without requiring lengthy synthesis process NetFPGA provides Perl simulation infrastructure to: –Send/receive packets Physical ports and CPU –Read/write registers –Verify results Simulations run in ModelSim/VCS

Building an Internet Router (P33) Michaelmas Testing: Simulation (2) Simulations located in project/verif Multiple simulations per project –Test different features Example: –bir_starter/verif/test_fwd_sourcePort0 Test forwarding of packets from port 0 to port 1

Building an Internet Router (P33) Michaelmas Testing: Simulation (3) Example functions: –nf_PCI_read32(delay, batch, addr, expect) –nf_PCI_write32(delay, batch, addr, value) –nf_packet_in(port, length, delay, batch, pkt) –nf_expected_packet(port, length, pkt) –nf_dma_data_in(length, delay, port, pkt) –nf_expected_dma_data(port, length, pkt) –make_IP_pkt(length, da, sa, ttl, dst_ip, src_ip)

Building an Internet Router (P33) Michaelmas Running Simulations Use command nf2_run_test.pl –Optional parameters --major --minor --gui (starts the default viewing environment) test_fwd_sourcePort0 Problems? check the environment variables reference your project NF2_DESIGN_DIR=/root/NF2/projects/ PERL5LIB=/root/NF2/projects/ /lib/Perl5: /root/NF2/lib/Perl5: majorminor

Building an Internet Router (P33) Michaelmas Running Simulations When running modelsim interactively: –Click "no" when simulator prompts to finish –Changes to code can be recompiled without quitting ModelSim: bash# cd /tmp/$(whoami)/verif/ ; make model_sim VSIM 5> restart -f; run -a –Problems? do ensure $NF2_DESIGN_DIR is correct

Building an Internet Router (P33) Michaelmas Synthesis To synthesize your project –Run make in the synth directory (/root/NF2/projects/bir_starter/synth)

Building an Internet Router (P33) Michaelmas Regression Tests Test hardware module Perl Infrastructure provided includes: –Read/Write registers –Read/Write tables –Send Packets –Check Counters

Building an Internet Router (P33) Michaelmas Example Regression Tests For a Router… –Send Packets from CPU –Longest Prefix Matching –Longest Prefix Matching Misses –Packets dropped when queues overflow –Receiving Packets with IP TTL <= 1 –Receiving Packets with IP options or non IPv4 –Packet Forwarding –Dropping packets with bad IP Checksum

Building an Internet Router (P33) Michaelmas Perl Libraries Specify the Interfaces –eth1, eth2, nf2c0 … nf2c3 Start packet capture on Interfaces Create Packets –MAC header –IP header –PDU Read/Write Registers Read/Write Reference Router tables –Longest Prefix Match –ARP –Destination IP Filter

Building an Internet Router (P33) Michaelmas Regression Test Examples Reference Router –Packet Forwarding regress/test_packet_forwarding –Longest Prefix Match regress/test_lpm –Send and Receive regress/test_send_rec

Building an Internet Router (P33) Michaelmas Creating a Regression Test Useful functions: –nftest_regwrite(interface, addr, value) –nftest_regread(interface, addr) –nftest_send(interface, frame) –nftest_expect(interface, frame) –$pkt = NF2::IP_pkt->new(len => $length, DA => $DA, SA => $SA, ttl => $TTL, dst_ip => $dst_ip, src_ip => $src_ip);

Building an Internet Router (P33) Michaelmas Creating a Regression Test (2) Your task: 1.Template files /root/NF2/projects/bir_starter/regress/test_fwd_sourcePort0/run.pl 2.Implement your Perl verif tests

Building an Internet Router (P33) Michaelmas Running Regression Test Run the command nf2_regress_test.pl --project bir_starter