270 likes | 406 Views
GEC7: SPP Tutorial Hands On Exercises. John DeHart Computer Science & Engineering Washington University www.arl.wustl.edu. Diagram of Your Network. Your Laptop. ssh. spphost #. Control Processor. (GPE) MetaRouter Control. NPE MetaRouter FastPath. Connectivity to
E N D
GEC7: SPP TutorialHands On Exercises John DeHartComputer Science & EngineeringWashington Universitywww.arl.wustl.edu
Diagram of Your Network Your Laptop ssh spphost# Control Processor (GPE) MetaRouter Control NPE MetaRouter FastPath Connectivity to Neighbor Rtr PlanetLab Host PlanetLab Host
SPP Utilities, Daemons and Scripts • Utilities: • scfg: Slice Config • Generic: Not specific to any Meta-Router • Add/remove meta interfaces (udp tunnels) • Bind queues to meta interfaces • Set queue parameters. • ip_fpc: ipv4 fastpathconfig • Specific to the IPv4 Meta-Router • Add filters to fast path meta router • Daemons • ip_fpd: ipv4 fastpath daemon • Specific to the IPv4 Meta-Router • Create fast path • Process local delivery and exception packets • sliced: slice daemon • Generic: Not specific to any Meta-Router • Process monitoring requests • Scripts • configureRouter.sh • Builds the fast path and configures it. • Uses a lot of shell variables (may be confusing) • teardownRouter.sh
Utilities Just for This Tutorial • pingit • Run on your spphost, causes an ICMP Request to be embedded in a UDP Tunnel and sent to an SPP • tgit • Run on your spphost, causes a UDP packet to be sent to a PlanetLab host. • On these PlanetLab hosts we have a server running which will start a traffic generator when it receives one of these UDP packets. • The UDP payload contains parameters for the traffic generator: • Destination address • Number of packets to send • Packet size • Packet per second rate
What we are going to do today: ping pingit spphost# Control Processor (GPE) MR Control Pingit MI TG Src MI Neighbor Rtr Meta-interface NPE MR FastPath PlanetLab Host TG Dst MI Ping the SPP PlanetLab Host Ping the Meta-Router Route Traffic through Meta-Router Route Traffic to/from neighbor Meta-Router
Addressing in your Meta-Network ping pingit spphost# 10.10.#.17 (GPE) MR Control 10.10.#.1 Control Processor Pingit MI TG Src MI Neighbor Rtr Meta-interface NPE MR FastPath PlanetLab Host 10.10.#.2 TG Dst MI Where # is replaced by the number From your user id. Example for user gec07: 10.10.7.1 (MR Address) 10.10.7.17 (Pingit host) 10.10.7.2 (TG Src PL Host) 10.10.7.3 (TG Dst PL Host) PlanetLab Host 10.10.#.3
Current SPP Network 64.57.23.210 64.57.23.178 10.1.1.1 10.1.1.2 KANS SALT • Each SPP has 3 Public Internet2 Interfaces. • Each SPP has 2 internal interfaces to each other SPP. 64.57.23.214 10.1.2.2 64.57.23.182 10.1.2.1 64.57.23.186 64.57.23.218 10.1.7.2 10.1.3.1 10.1.8.2 10.1.4.1 10.1.7.1 10.1.3.2 10.1.4.2 10.1.8.1 WASH 64.57.23.194 64.57.23.202 64.57.23.198
Current SPP Network 64.57.23.210 64.57.23.178 10.1.7.1 10.1.1.2 WASH SALT • Each SPP has 3 Public Internet2 Interfaces. • Each SPP has 2 internal interfaces to each other SPP. 64.57.23.214 10.1.2.2 64.57.23.182 10.1.8.1 64.57.23.186 64.57.23.218 10.1.7.2 10.1.3.2 10.1.8.2 10.1.4.2 10.1.1.1 10.1.3.1 10.1.4.1 10.1.2.1 KANS 64.57.23.178 64.57.23.186 64.57.23.182
scfg –cmdget_ifaces [wupl_GEC7_01@kans_spp ~]$ scfg --cmdget_ifaces Interface list: [ifn 0, type "inet", linkBW 1000000Kbps, availBW 864488Kbps, ipAddr 64.57.23.178] [ifn 1, type "inet", linkBW 1000000Kbps, availBW 869360Kbps, ipAddr 64.57.23.182] [ifn 2, type "inet", linkBW 1000000Kbps, availBW 869360Kbps, ipAddr 64.57.23.186] [ifn 3, type "p2p", linkBW 1000000Kbps, availBW 869360Kbps, ipAddr 10.1.1.1] [ifn 4, type "p2p", linkBW 1000000Kbps, availBW 869296Kbps, ipAddr 10.1.2.1] [ifn 5, type "p2p", linkBW 1000000Kbps, availBW 869360Kbps, ipAddr 10.1.3.1] [ifn 6, type "p2p", linkBW 1000000Kbps, availBW 869296Kbps, ipAddr 10.1.4.1] • ifn: interface number • type: • inet: Internet • p2p: Point to Point • linkBW: total bandwidth on the link (1Gb/s) • availBW: total bandwidth currently available • ipAddr: This interface’s address on this SPP
Meta Interfaces (UDP Tunnels) SALT TG Src MI Neighbor Rtr Meta-interface TG Dst MI This Meta-Interface defined as: 64.57.23.214/21003 SALT_SPP_IFN_1="64.57.23.214" … SPP_IFN_1=$SALT_SPP_IFN_1 … SPP_TGSRC_MI_IPADDR=$IP_RTR_PORT_9 … SPP_TGSRC_MI_PORT=21003 scfg --cmdsetup_fp_tunnel --fpid 0 --bw 10000 --ipaddr $SPP_TGSRC_MI_IPADDR --port $SPP_TGSRC_MI_PORT From configureRouter.sh which we will be using later.
Meta Interfaces (UDP Tunnels) SALT TG Src MI Neighbor Rtr Meta-interface TG Dst MI This Meta-Interface defined as: 64.57.23.218/21003 SALT_SPP_IFN_2="64.57.23.218" … SPP_IFN_2=$SALT_SPP_IFN_2 … SPP_TGDST_MI_IPADDR=$SPP_IFN_2 … SPP_TGDST_MI_PORT=21003 scfg --cmdsetup_fp_tunnel --fpid 0 --bw 10000 --ipaddr $SPP_TGDST_MI_IPADDR --port $SPP_TGDST_MI_PORT From configureRouter.sh which we will be using later.
Filters SALT TG Src MI Filter Neighbor Rtr Meta-interface This adds a filter to the SRC MI to route packets to the DST MI TG Dst MI ip_fpc --cmdwrite_fltr --fpid 0 --fid $FID \ --key_type 0 --key_rxmi $MID_SRC \ --key_daddr $ HOST_TGDST_MN_ADDR \ --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 $HOST_TGDST_IPADDR \ --txdport $HOST_TGDST_UDPPORT –qid $QID_DST_MI --sindx $FID Key Mask Result
Filters (continued) SALT TG Src MI Filter Neighbor Rtr Meta-interface Key matches on DST MetaNet Address TG Dst MI ip_fpc --cmdwrite_fltr --fpid 0 --fid $FID \ --key_type 0 --key_rxmi $MID_SRC \ --key_daddr $HOST_TGDST_MN_ADDR \ --key_saddr 0 --key_sport 0 --key_dport 0 --key_proto 0 \ --mask_daddr0xFFFFFFFF --mask_saddr 0 --mask_sport 0 \ --mask_dport 0 --mask_flags 0 \ --txdaddr $HOST_TGDST_IPADDR \ --txdport $HOST_TGDST_UDPPORT –qid $QID_DST_MI --sindx $FID Key Mask Result
Filters (continued) SALT TG Src MI Filter Neighbor Rtr Meta-interface qid is bound to Router DST MI That is what gets packet to go OUT that MI TG Dst MI ip_fpc --cmdwrite_fltr --fpid 0 --fid $FID \ --key_type 0 --key_rxmi $MID_SRC \ --key_daddr $ HOST_TGDST_MN_ADDR \ --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 $HOST_TGDST_IPADDR \ --txdport $HOST_TGDST_UDPPORT –qid $QID_DST_MI --sindx $FID Key Mask Result
Filters (continued) SALT TG Src MI Filter Neighbor Rtr Meta-interface Addr/Port in Result are for host at other end of that tunnel. Addr is what gets the Internet to deliver packet to end host and port gets the host to deliver to application TG Dst MI ip_fpc --cmdwrite_fltr --fpid 0 --fid $FID \ --key_type 0 --key_rxmi $MID_SRC \ --key_daddr $HOST_TGDST_MN_ADDR \ --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 $ HOST_TGDST_IPADDR \ --txdport $ HOST_TGDST_UDPPORT –qid $QID_DST_MI --sindx $FID Key Mask Result
You will add… SALT TG Src MI Filter Neighbor Rtr Meta-interface Filter TG Dst MI New Meta-Interface to connect your router to a neighbor router. New Filter to direct traffic from your SRC to their DST New Filter to direct traffic from their SRC to your DST
Directions for Hands On Exercises • Note your User id: gec## • Note your SPP • Open THREE windows • ssh to your spp host in EACH window • Initiate your SSH Tunnel • You will want to leave this up for the duration of the Exercises. • Window 1: ping • First, ping your SPP (refer to your “User: gec##” page for your SPP) • ping sppkans1.arl.wustl.edu OR sppwash1.arl.wustl.edu OR sppsalt1.arl.wustl.edu • Run pingit • cd GEC7 • ./pingit • Notice the UDP Port number that it reports. • But don’t “press any key to continue” yet.
Directions for Hands On Exercises (continued) • Window 2: ssh to slice on your assigned SPP • ssh -i ~/.ssh/gec##_id_rsa wupl_GEC7_##@<spp> • Also show on your “User: gec##” page • Ping something back on your campus that your firewalls will allow you to ping… • Or ping something on our campus: • > ping drn06.arl.wustl.edu • See what interfaces your SPP has: • >scfg --cmdget_ifaces • TWO DASHES before cmd!! • cdHandsOnSession/UserScripts/User_##/ • ./configureRouter.sh <udpport from pingit> • Now, just for practice, tear down the router: • ./teardownRouter.sh • Then re-run the configureRouter.sh script • On your laptop, start SPPMon.jar • Load monitoring file • Under File menu select Open • Double Click on User##.exp • Go back to ‘pingit’ window (Window 1) and hit Enter • You should see the monitoring graph counting the ping requests and responses. • The lines may be on top of each other. Placing your mouse on a label on the right margin brings the corresponding line to the front • Try hitting ‘Enter’ multiple times if you like.
Directions for Hands On Exercises (continued) • Window 3: Traffic Generator • Run the traffic generator: • cd GEC7 • ./tgit • Notice the values that it reports for • Number of packets • Packet per second rate • Packet payload length • Destination address • tgit is actually a script that runs a java app on your spphost. The java app sends a request to a server on the TG SRC host asking it to start a traffic generator. • Look at monitoring graph to see the tgpkts being counted. • Look at the command line arguments for tgit: • ./tgit --help • Try running tgit and change the parameters of the traffic. • Leave the destination address the same as original run reported.
Directions for Hands On Exercises (continued) • Now lets pair up with another user • gec01 – gec02 • gec03 – gec04 • Etc… • Before editing the configureRouter.sh script, fill in the work sheets on the following pages • We want to add a new meta-interface to connect your two routers • Then add the necessary filters to be able to send traffic across both routers
Worksheet(s) – Page 1 UserN+1 UserN srcN+1 srcN TG Src MI TG Src MI PEER MI PEER MI Filter1 Filter1 Filter2 Filter2 dstN+1 TG Dst MI TG Dst MI dstN • We are going to list the parameters you will need for • Building a new MI • Adding a filter to route traffic from yoursrc to your neighbor’s dst • Adding a filter to route traffic coming from your neighbor’s src to your dst. • Work with your partner. • Figure out which one of you is UserN and which is UserN+1
Worksheet(s) – Page 2 UserN+1 UserN srcN+1 srcN • UserNMI to Neighbor • My SPP Name: ___________ • Other SPP Name: ___________ • Link between SPPs: • Look at “Current SPP Network” Slide!!! • My Addr: _______________ (ARG0) • Other End Addr: _______________ • Pick a Port Number ________ (ARG1) • Do NOT use port #’s in range 32768-49151 TG Src MI TG Src MI PEER MI PEER MI Filter1 Filter1 Filter2 Filter2 dstN+1 TG Dst MI TG Dst MI dstN • UserN+1 MI to Neighbor • My SPP Name: ___________ • Other SPP Name: ___________ • Link between SPPs: • Look at “Current SPP Network” Slide!!! • My Addr: _______________ (ARG0) • Other End Addr: _______________ • Pick a Port Number ________(ARG1) • Do NOT use port #’s in range 32768-49151
Worksheet(s) – Page 3 UserN+1 UserN srcN+1 srcN • UserNFilter1 • Key DADDR (dstN+1): • MN DestAddr: ______________ (ARG2) • Name of MI to send pkts to: _______ • QID: _____________ (ARG5) • We have already used 0, 1, 2 for other Mis. • Chose something else • Addr on other end of MI: ___________ (ARG3) • Port on other end of MI: ___________ (ARG4) TG Src MI TG Src MI PEER MI PEER MI Filter1 Filter1 Filter2 Filter2 dstN+1 TG Dst MI TG Dst MI dstN • UserN+1 Filter1 • Key DADDR (dstN): • MN DestAddr: ______________ (ARG2) • Name of MI to send pkts to: _______ • QID: _____________ (ARG5) • We have already used 0, 1, 2 for other Mis. • Chose something else • Addr on other end of MI: ___________ (ARG3) • Port on other end of MI: ___________ (ARG4)
Before we do Filter2 Lets Review … Here is the filter for sending from your SRC MI to your DST MI. qid is bound to Router DST MI That is what gets packet to go OUT that MI Addr/Port in Result are for host at other end of that tunnel. Addr is what gets the Internet to deliver packet to end host and port gets the host to deliver to application YOU WILL NEED THESE SAME VALUES when you have Filter2 send to your DST MI SALT TG Src MI Filter Neighbor Rtr Meta-interface TG Dst MI ip_fpc --cmdwrite_fltr --fpid 0 --fid $FID \ --key_type 0 --key_rxmi $MID_SRC \ --key_daddr $HOST_TGDST_MN_ADDR \ --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 $HOST_TGDST_IPADDR \ --txdport $HOST_TGDST_UDPPORT –qid $QID_DST_MI --sindx $FID Key Mask Result
Worksheet(s) – Page 4 UserN+1 UserN srcN+1 srcN • UserNFilter2 • Key DADDR (dstN): • MN DestAddr: ______________ (ARG6) • Name of MI to send pkts to: _______ • REUSE EXISTING VARIABLES!!! • QID: _____________ (ARG9) • Addr on other end of MI: ___________ (ARG7) • Port on other end of MI: ___________ (ARG8) TG Src MI TG Src MI PEER MI PEER MI Filter1 Filter1 Filter2 Filter2 dstN+1 TG Dst MI TG Dst MI dstN • UserN+1 Filter2 • Key DADDR (dstN+1): • MN DestAddr: ______________ (ARG6) • Name of MI to send pkts to: _______ • REUSE EXISTING VARIABLES!!! • QID: _____________ (ARG9) • Addr on other end of MI: ___________ (ARG7) • Port on other end of MI: ___________ (ARG8)
Directions for Hands On Exercises (continued) • Now make the necessary changes to configureRouter.sh • There are notes in configureRouter.sh to help you achieve this. • Editors available: vi, emacs, nano • Open configureRouter.sh in an editor and search for the word Updates. Start there… • Don’t forget to comment out the exit… • Redo your configuration: • Close SPPmon session: • Under File menu select ‘Close’ • Run ./teardownRouter.sh to remove the previous configuration. • Run ./configureRouter.sh to reconfigure with your new configuration. • Look for errors in log.out • When all seems ok: • Reload the monitoring from the same file. • Add any new monitoring entries that you might need. • Look at the output from your configureRouter.sh script to see what indices you need to add • To add a new index to monitor, click on the center of the SPP icon and select StatsPreQPkt, fill in the index, select Rate, and click Enter • Change your dest. address argument to tgit and try to send through both of your routers. • Try it from both directions (each of you try running tgit)
Directions for Hands On Exercises (continued) • Now increase the packet per second rate until you think the rates you are seeing on the two routers are different. • Why are they different? • Try adding some monitoring to look at the queues on each side of your new Meta-Interface. • Add a new monitoring graph • Under the Monitoring Menu, select Add Monitoring Display • Add a monitor for the queue length in packets for your new qid • Click on the center of the SPP icon and select QLengthPkt, fill in the qid and DO NOT select Rate • Try your increased packet rate now. • Do you see the queue fill up? • Now lets manipulate the queue parameters • scfg --cmdset_queue_params --fpid 0 --qid <###> --threshold 1000 --bw 10000 • Try different values for threshold. • Changing the BW right now will not have any impact since there are no competing flows. • This queue is the only queue on a MI that has a 10Mb/s rate. • Even if you reduce this queue to less than 10Mb/s it will be capped by the MI rate if there is no other traffic for that MI.