80 likes | 209 Views
GEC7: SPP Tutorial Creating and Running a Fast Path. John DeHart Computer Science & Engineering Washington University www.arl.wustl.edu. Creating a Fast Path Instance. Each code option requires its own Fast Path daemon For example: IPv4 Code option: ip_fpd Runs on the GPE
E N D
GEC7: SPP TutorialCreating and Running a Fast Path John DeHartComputer Science & EngineeringWashington Universitywww.arl.wustl.edu
Creating a Fast Path Instance • Each code option requires its own Fast Path daemon • For example: IPv4 Code option: ip_fpd • Runs on the GPE • Communicates with the RMP to cause the loading and initial configuration of the instance • Listens on two sockets for Local Delivery and Exception packets. • Local Delivery: Packets addressed to Fast Path’s MetaNet Address • For example: ip_fpd responds to ICMP requests (ping) with appropriate ICMP response • Exception Pkts: Packets flagged by Fast Path as exceptions • For example: ip_fpd receives TTL expired packets from Fast Path and generates appropriate ICMP message. • Parameters: • Name: • MetaNet Address: • Port Number: • Example: ip_fpd --fpName fp1 --myIP 10.10.1.1 --myPort 5556 -- creates an IPv4 Fast Path with name fp1 and MetaNet address 10.10.1.1
Meta Interfaces • Just like Routers have Interfaces, Meta-Routers have Meta-Interfaces • Several Meta-Interfaces from different Meta-Routers can exist on the same Physical Interface • A Meta-Interface is defined by an SPP IP Address and UDP Port • MetaNet Packets arrive at a Meta-Interface encapsulated in a UDP Tunnel • It is the identification of the MI by IP Addr and UDP Port# that designates a packet to be delivered to a specific Fastpath UDP/IP Tunnel Hdr MN Packet Hdr (IPv4 Hdr in this case) UDP/IP Payload (MN Packet) MN Packet Payload (IPv4 Pkt payload in this case)
scfg –cmdsetup_fp_tunnel • Command for setting up a Meta-Interface: • scfg --cmdsetup_fp_tunnel --fpid 0 --bw 10000 --ipaddr 64.57.23.182 --port 55555 • MID=$? • scfg returns value of Meta-Interface ID which can be assigned to a shell variable. • Sets up a MI • For Fast Path 0 • With a Bandwidth of 10 Mb/s (bw is specified in Kb/s) • On interface 64.57.23.182 (KANS ifn 1) • Using UDP Port 55555
Queues • A Queue is Bound to a Meta-Interface • QID: Queue Identifier • 65536 queues shared across all MetaRouters and MetaInterfaces on each SPP • Number of queues allocated to a MetaRouter specified in Reservation • A MetaRouter’s QID space is number 0 through N-1 for a reservation of N queues. • Threshold • Maximum number of packets in queue before packet dropping starts • Bandwidth • Guaranteed minimum rate for traffic assigned to this queue: • It can transmit more if there is no competition • Example: scfg --cmdbind_queue --fpid 0 --miid 1 --qid_list_type 0 --qid_list 2 -- binds qid 2 to Meta-Interface 1 scfg --cmdset_queue_params --fpid 0 --qid 2 --threshold 1000 --bw 10000 -- configures qid 2 with threshold of 1000 pkts and bandwidth of 10Mb/s
Filters • Filters in a Meta-Router route pkts from one Meta-Interface to another. • Filters are installed on a specific Meta-Interface. • They apply to packets arriving on that Meta-Interface only • Filters have three parts: • Key (type, MN_Key) • type=0: Normal • type=1: Bypass, used for packets coming from the slow_path which have already been classified. • MN_Key • rxmi, daddr, saddr, dport, sport, proto • Mask • Result (daddr, dport, qid, stats_index) • Result is NOT MN specific • The qid identifies the outgoing MI since queues are bound to MIs • The (daddr, dport) pair defines the other end of the MI for outgoing pkt. • The stats_index allows us to monitor the number of packets forwarded by this filter. • Example ip_fpc --cmdwrite_fltr --fpid 0 --fid 4 \ --key_type 0 --key_rxmi 2 --key_daddr 10.10.1.3 \ --key_saddr 0 --key_sport 0 --key_dport 0 --key_proto 0 \ --mask_daddr 0xFFFFFFFF --mask_saddr 0 \ --mask_sport 0 --mask_dport 0 --mask_flags 0 \ --txdaddr 128.112.139.25 --txdport 21001 --qid 3 --sindx 4
Generating Data for a Fast Path • Whatever application is used to generate MetaNet packets to be handled by an SPP Fast Path, the MetaNet packets MUST be encapsulated in a UDP Tunnel. • When the MetaNet Protocol is IPv4, using a VPN, like OpenVPN, can be made to work for this. • The SPP does not act like an OpenVPN Server. • One of your end hosts can be the Server and others be clients. • Once you have routes set up in your Fast Path to provide connectivity between all clients and the server, it works. • BUT OpenVPN does not work with PlanetLab. • OpenVPN uses the tun/tap interface and PlanetLab already uses that for VNET. • Modify existing tools/applications • For example, it probably would not be too difficult to modify iperf to do it. • MetaNet Specific Application code. • You can write your own end host application code which does the UDP tunnel encapsulation. • For our Hands On exercises we will use a traffic generator program of our own that has been enabled to do UDP Tunnel encapsulation.
Traffic Monitoring • Stats Index • A statistics index is associated with each Filter • One statistics index can be used across multiple filters to agregrate traffic statistics • Each index has four counters associated with it: • Pre-Queue Packet Counter • Pre-Queue Byte Counter • Post-Queue Packet Counter • Post-Queue Byte Counter • Queue Length • Indexed by Queue Identifier (QID) • Two lengths associated with each Queue • Length in Packets • Length in Bytes Post-Queue Pre-Queue Filters Queue Length Lookup HeaderFormat outputinterfaces ... ... QueueManager