John DeHart Computer Science & Engineering Washington University www.arl.wustl.edu GEC7: SPP Tutorial Hands On Exercises
Feb 24, 2016
John DeHartComputer Science & EngineeringWashington University
www.arl.wustl.edu
GEC7: SPP TutorialHands On Exercises
2
Connectivity toNeighbor Rtr
Diagram of Your Network
NPE Slice FastPath
(GPE)FastPath Control
ControlProcessor
spphost#
PlanetLabHost
PlanetLabHost
Your Laptopssh
3
SPP Utilities, Daemons and Scripts Utilities:
» scfg: Slice Config • Generic: Not specific to any FastPath• Add/remove fastpath interfaces (udp tunnels)• Bind queues to fastpath interfaces• Set queue parameters.
» ip_fpc: ipv4 fastpath config• Specific to the IPv4 FastPath• Add filters to FastPath
Daemons» ip_fpd: ipv4 fastpath daemon
• Specific to the IPv4 FastPath• Create fast path• Process local delivery and exception packets
» sliced: slice daemon• Generic: Not specific to any FastPath• Process monitoring requests
Scripts» configureRouter.sh
• Builds the fast path and configures it.• Uses a lot of shell variables (may be confusing)
» teardownRouter.sh
4
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
5
Neighbor Rtr Fastpath interface
What we are going to do today:
(GPE) FastPath Control
Pingit FPIF
TG Src FPIF
TG Dst
FPIF
pingpingit
ControlProcessor
spphost#
PlanetLabHost
PlanetLabHost Ping the Slice
Route Traffic through Slice FastPath
Ping the SPP
Route Traffic to/from neighbor Slice
NPE Slice FastPath
6
Neighbor Rtr Fastpath interface
Addressing in your Overlay Network
NPE Slice FastPath
(GPE)FastPathControl10.10.#.1
Pingit FPIF
TG Src FPIF
TG Dst
FPIF
pingpingit
ControlProcessor
spphost#10.10.#.17
PlanetLabHost10.10.#.2
PlanetLabHost10.10.#.3
Where # is replaced by the numberFrom your user id.Example for user gec07:
10.10.7.1 (Slice Router Addr)
10.10.7.17 (Pingit host)10.10.7.2 (TG Src PL Host)10.10.7.3 (TG Dst PL Host)
7
Current SPP Network
SALT WASH
KANS
64.57.23.210
64.57.23.21464.57.23.218
64.57.23.194
64.57.23.19864.57.23.202
64.5
7.23
.178
64.5
7.23
.182
64.5
7.23
.186
10.1.7.2 10.1.7.110.1.8.2 10.1.8.1
10.1.1.2
10.1.2.2
10.1.1.1
10.1.2.1
10.1.
3.210
.1.4.2
10.1.
3.110
.1.4.1
Each SPP has 3 Public Internet2 Interfaces.
Each SPP has 2 internal interfaces to each other SPP.
8
scfg –cmd get_ifaces[wupl_GEC7_01@kans_spp ~]$ scfg --cmd get_ifacesInterface 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
9
Neighbor Rtr Fastpath interface
fastpath interfaces (UDP Tunnels)
SALT
TG Src FPIF
TG Dst FPIF
SALT_SPP_IFN_1="64.57.23.214" …SPP_IFN_1=$SALT_SPP_IFN_1…SPP_TGSRC_FPIF_IPADDR=$IP_RTR_PORT_9…SPP_TGSRC_FPIF_PORT=21003
scfg --cmd setup_fp_tunnel --fp 0 --bw 10000 --ipaddr $SPP_TGSRC_FPIF_IPADDR --port $SPP_TGSRC_FPIF_PORT
This Fastpath interface defined as:64.57.23.214/21003
FromconfigureRouter.shwhich we will beusing later.
10
Neighbor Rtr Fastpath interface
fastpath interfaces (UDP Tunnels)
SALT
TG Src FPIF
TG Dst FPIF
SALT_SPP_IFN_2="64.57.23.218" …SPP_IFN_2=$SALT_SPP_IFN_2…SPP_TGDST_FPIF_IPADDR=$SPP_IFN_2…SPP_TGDST_FPIF_PORT=21003
scfg --cmd setup_fp_tunnel --fp 0 --bw 10000 --ipaddr $SPP_TGDST_FPIF_IPADDR --port $SPP_TGDST_FPIF_PORT
This Fastpath interface defined as:64.57.23.218/21003
FromconfigureRouter.shwhich we will beusing later.
11
Neighbor Rtr Fastpath interface
Filters
SALT
TG Src FPIF
TG Dst FPIF
ip_fpc --cmd write_fltr --fp 0 --fid $FID \ --key_type 0 --key_rxfpif $FPIF_SRC \ --key_daddr $ HOST_TGDST_OVLY_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_FPIF --sindx $FID
Key
Filter
Mask
Result
This adds a filter to the SRC FPIFto route packets to the DST FPIF
12
Neighbor Rtr Fastpath interface
Filters (continued)
SALT
TG Src FPIF
TG Dst FPIF
ip_fpc --cmd write_fltr --fp 0 --fid $FID \ --key_type 0 --key_rxfpif $FPIF_SRC \ --key_daddr $HOST_TGDST_OVLY_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_FPIF --sindx $FID
Key
Filter
Mask
Result
Key matches on DST Overlay Address
13
Neighbor Rtr Fastpath interface
Filters (continued)
SALT
TG Src FPIF
TG Dst FPIF
ip_fpc --cmd write_fltr --fp 0 --fid $FID \ --key_type 0 --key_rxfpif $FPIF_SRC \ --key_daddr $ HOST_TGDST_OVLY_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_FPIF --sindx $FID
Key
Filter
Mask
Result
qid is bound to Router DST FPIFThat is what gets packet to go OUT that FPIF
14
Neighbor Rtr Fastpath interface
Filters (continued)
SALT
TG Src FPIF
TG Dst FPIF
ip_fpc --cmd write_fltr --fp 0 --fid $FID \ --key_type 0 --key_rxfpif $FPIF_SRC \ --key_daddr $HOST_TGDST_OVLY_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_FPIF --sindx $FID
Key
Filter
Mask
Result
Addr/Port in Result are for hostat other end (Next Hop) of that tunnel.Addr is what gets the Internet todeliver packet to end host and port gets the host to deliver to application
15
Neighbor Rtr Fastpath interface
You will add…
SALT
TG Src FPIF
TG Dst FPIF
Filter
New Fastpath interface to connect your router to a neighbor router.New Filter to direct traffic from your SRC to their DSTNew Filter to direct traffic from their SRC to your DST
Filter
16
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.
17
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 --cmd get_ifaces– TWO DASHES before cmd!!
» cd HandsOnSession/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.
18
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 tg pkts 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.
19
Directions for Hands On Exercises (continued) Now lets pair up with another user
• gec01 – gec02• gec03 – gec04• Etc…
We are going to try to join your Router to your Neighbor’s» To do this we need a new Fastpath interface on each router» We also need filters to be able to send traffic across both routers» We will make changes to configureRouter.sh» Before editing the configureRouter.sh script, fill in the work sheets on the following pages» As you go through the worksheets, note that parenthetical notes (ARG#)
• These will come in handy when you go to edit configureRouter.sh
20
Worksheet(s) – Page 1
TG Src FPIF
TG Dst FPIF
Filter1
Filter2
TG Src FPIF
TG Dst FPIF
Filter1
Filter2
We are going to list the parameters you will need for Building a new FPIF Adding a filter to route traffic from your src 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
srcN
dstN
srcN+1
dstN+1
UserN UserN+1
PEER FPIF PEER FPIF
21
Worksheet(s) – Page 2TG Src FPIF
TG Dst FPIF
Filter1
Filter2
TG Src FPIF
TG Dst FPIF
Filter1
Filter2
UserN FPIF to Neighbor My SPP Name: ___________ Other SPP Name: ___________ Link between SPPs:
» Look at “Current SPP Network” Slide!!!» My Addr: _______________ (ARG0)» Other End(Next Hop) Addr: _______________
Pick a Port Number ________ (ARG1)» Do NOT use port #’s in range 32768-49151
UserN+1 FPIF to Neighbor My SPP Name: ___________ Other SPP Name: ___________ Link between SPPs:
» Look at “Current SPP Network” Slide!!!» My Addr: _______________ (ARG0)» Other End(Next Hop) Addr: _______________
Pick a Port Number ________ (ARG1)» Do NOT use port #’s in range 32768-49151
srcN
dstN
srcN+1
dstN+1
UserN UserN+1
PEER FPIF PEER FPIF
22
Worksheet(s) – Page 3
TG Src FPIF
TG Dst FPIF
Filter1
Filter2
TG Src FPIF
TG Dst FPIF
Filter1
Filter2
UserN Filter1 Key DADDR (dstN+1):
» Overlay Dest Addr: ______________ (ARG2) Name of FPIF to send pkts to: ______
» QID: _____________ (ARG5)• We have already used 0, 1, 2 for other FPIFs.• Chose something else
» Addr on other end of FPIF: __________ (ARG3)» Port on other end of FPIF: __________ (ARG4)
UserN+1 Filter1 Key DADDR (dstN):
» Overlay Dest Addr: ______________ (ARG2) Name of FPIF to send pkts to: ______
» QID: _____________ (ARG5)We have already used 0, 1, 2 for other FPIFs.Chose something else
» Addr on other end of FPIF: __________ (ARG3)» Port on other end of FPIF: __________ (ARG4)
srcN
dstN
srcN+1
dstN+1
UserN UserN+1
PEER FPIF PEER FPIF
23
Neighbor Rtr Fastpath interface
Before we do Filter2 Lets Review …
SALT
TG Src FPIF
TG Dst FPIF
ip_fpc --cmd write_fltr --fp 0 --fid $FID \ --key_type 0 --key_rxfpif FPIF_SRC \ --key_daddr $HOST_TGDST_OVLY_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_FPIF --sindx $FID
Key
Filter
Mask
Result
Here is the filter for sending fromyour SRC FPIF to your DST FPIF.
qid is bound to Router DST FPIFThat is what gets packet to go OUT that FPIF
Addr/Port in Result are for hostat other end (Next Hop) of that tunnel.Addr is what gets the Internet todeliver packet to end host and port gets the host to deliver to application
YOU WILL NEED THESE SAME VALUESto you have Filter2 send to your DST FPIF
24
Worksheet(s) – Page 4
TG Src FPIF
TG Dst FPIF
srcN
dstN
Filter1
Filter2
TG Src
FPIF
TG Dst FPIF
Filter1
Filter2
UserN Filter2 Key DADDR (dstN):
» Overlay Dest Addr: ______________ (ARG6) Name of FPIF to send pkts to: _______
» REUSE EXISTING VARIABLES!!!» QID: _____________ (ARG9)» Addr on other end of FPIF: ___________ (ARG7)» Port on other end of FPIF: ___________ (ARG8)
UserN+1 Filter2 Key DADDR (dstN+1):
» Overlay Dest Addr: ______________ (ARG6) Name of FPIF to send pkts to: _______
» REUSE EXISTING VARIABLES!!!» QID: _____________ (ARG9)» Addr on other end of FPIF: ___________ (ARG7)» Port on other end of FPIF: ___________ (ARG8)
srcN+1
dstN+1
UserN UserN+1
PEER FPIF PEER FPIF
25
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)
26
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 Fastpath 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 --cmd set_queue_params --fp 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 FPIF that has a 10Mb/s rate.• Even if you reduce this queue to less than 10Mb/s it will be capped by the FPIF rate if there is no
other traffic for that FPIF.