MSR Tutorial Group Exercises fredkarl wustl edu Washington

  • Slides: 35
Download presentation
MSR Tutorial Group Exercises fredk@arl. wustl. edu Washington WASHINGTON UNIVERSITY IN ST LOUIS

MSR Tutorial Group Exercises fredk@arl. wustl. edu Washington WASHINGTON UNIVERSITY IN ST LOUIS

Exercise Goals • Get you familiar with the tools we use for configuring, testing

Exercise Goals • Get you familiar with the tools we use for configuring, testing and analyzing the MSR • Get you familiar with building and running an MSR • Not worry about a lot of MSR internal details Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 2

General Info • Each group will be using 3 PCs – Data Source ($DSRC)

General Info • Each group will be using 3 PCs – Data Source ($DSRC) Linux – Monitor Switch Control Processor ($SWCP), Net. BSD – MSR Control Processor ($MSRCP), Linux • All utilities work on both Linux and Net. BSD • You must use Net. BSD when building: – MSR Kernels and Plugins • The exercises will start out by giving you very specific directions. • Later exercises leave out some details that you should be able to fill in from what you learned in earlier exercises. Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 3

General Info (continued) • MSRs are configured with serial cables to SPCs on Ports

General Info (continued) • MSRs are configured with serial cables to SPCs on Ports 4 and 5. See aliases spc 4 and spc 5 in the readme file and your login script. • We are going to be configuring and testing a router based on the WUGS and SPCs from the hardware on up. • There a LOT of details involved. Your login script defines macros/variables to simplify the configuration process. In particular the hosts are defined by the variables: – MSRCP, SWCP and DSRC Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 4

Preliminaries • Prior to you doing the exercises we have already defined a few

Preliminaries • Prior to you doing the exercises we have already defined a few simplifying macros and built the software utilities: – – – See $MSRTUT/README for a complete list of variables and aliases setenv REPODIR ~ setenv WUARL ${REPODIR}/wu_arl setenv WUGS ${WUARL}/wugs setenv WUTILS ${WUARL}/utilities/ setenv WUTUT ${WUARL}/TUTORIAL setenv MSR ${WUARL}/msr setenv MSRTUT ${WUTUT}/msr cd ${WUGS}/src gmake OSTYPE={Linux | Net. BSD} depend ${WUARL}/Make. script install Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 5

IP Configuration for Exercises 192. 168. 204. 1 P 3 IP Router (Switch +

IP Configuration for Exercises 192. 168. 204. 1 P 3 IP Router (Switch + SPCs + CP) P 1 192. 168. 205. 1 192. 168. 204. 2 Switch CP Host P 1 vci = 50 P 2 192. 168. 200. 1 P 0 MSR CP 192. 168. 220. 1 vci = 51 192. 168. 205. 2 192. 168. 200. 2 192. 168. 208. 1 P 5 192. 168. 220. 2 192. 168. 216. 1 192. 168. 216. 2 Data P 4 P 0 P 4 vci = 50 Src Host 192. 168. 224. 1 P 6 192. 168. 216. 1 P 3 Monitoring Switch P 7 Fred Kuhns - 1/11/2022 192. 168. 228. 1 P 7 MSR-# Switch Washington WASHINGTON UNIVERSITY IN ST LOUIS NH MSR (P 3) 192. 168. 216. 2 6

Group Host Assignments Data Source Switch CP Group # ${DSRC} ${SWCP} (Linux) (Net. BSD)

Group Host Assignments Data Source Switch CP Group # ${DSRC} ${SWCP} (Linux) (Net. BSD) MSR CP ${MSRCP} (Linux) Port 4 SPC serial line Port 5 SPC serial line 1 mouser demand 5 demand 4 demand 5 tip spc 1 demand 4 cu -l tty. S 0 -s 9600 2 tabby deak demand 0 deak tip spc 0 demand 0 cu -l tty. S 0 -s 9600 3 motti nmvc 2 nmvc 1 deak tip spc 4 demand 7 cu -l tty. S 0 -s 9600 4 abyssinian gussie demand 3 nmvc 2 tip spc 1 tomcat cu -l tty. S 0 -s 9600 5 tomcat nmvc 3 demand 8 demand 5 tip spc 0 demand 7 cu -l tty. S 1 -s 9600 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 7

Preliminaries - Host ATM config • All steps are also recorded in the ${MSRTUT}/cfgs/README

Preliminaries - Host ATM config • All steps are also recorded in the ${MSRTUT}/cfgs/README file. You can simple open this file, then cut and paste the commands • Logging on to the Tutorial hosts: – login: msr# password: Msr#Tut – root password, where needed: Tut. R 00 T (those are zero’s) Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 8

Preliminaries - Host ATM config 1. Login to the Data Source host, open a

Preliminaries - Host ATM config 1. Login to the Data Source host, open a local window (Linux) 1. open local window - use the alias ‘local’ defined in login script alias local '/usr/X 11 R 6/bin/xterm -j -sb -sl 1000 -bw 3 -T "Local" &' 2. go to config directory and become the root user • cd ${MSRTUT}; su 3. Assuming atmarpd has not be started, • /etc/init. d/atm start • ps -agx | grep | egrep "atmsigd|ilmid“ • kill <atmsigd_pid> <ilmid_pid> 4. Configure the APIC interface • . /apic. cfg port 4 5. exit root • exit Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 9

Preliminaries - Host ATM config 2. Open window on the monitoring Switch CP (Net.

Preliminaries - Host ATM config 2. Open window on the monitoring Switch CP (Net. BSD Host) • use alias swcp, this is already defined in your login script alias swcp 'ssh -f $SWCP /usr/X 11 R 6/bin/xterm -ls -j -sb -sl 1000 -bw 3 -T "SWCP($SWCP)"' • go to config directory and become the root user • cd ${MSRTUT}/cfgs; su • configure local APIC interface for the switch cp • . /apic. cfg port 1 swcp • exit root user • exit • Start up GBNSC and configure Monitoring Switch • ${WUGS}/bin/Net. BSD/new. GBNSC. init -P 3551 -init. GBNSC. switch 1 config. GBNSC. switch 1 & • ${WUGS}/bin/Net. BSD/Jammer 0. 1 ${SWCP} 3551 group. js Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 10

Preliminaries - Host ATM config 3. Open window on the MSR CP (Linux Host)

Preliminaries - Host ATM config 3. Open window on the MSR CP (Linux Host) 1. use the alias ‘msrcp’ defined in your login script alias msrcp 'ssh -f $MSRCP /usr/X 11 R 6/bin/xterm -j -sb -sl 1000 -bw 3 -T "MSRCP($MSRCP)"‘ 2. go to config directory and become the root user 1. cd ${MSRTUT}/cfgs; su 3. Assuming atmarpd has not be started, 1. /etc/init. d/atm start 2. ps -agx | grep | egrep "atmsigd|ilmid“ 3. kill <atmsigd_pid> <ilmid_pid> 4. configure local APIC interface for the switch cp 1. . /apic. cfg port 0 5. exit root user • exit Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 11

Preliminaries - Building a kernel • Go to your Switch CP host window (must

Preliminaries - Building a kernel • Go to your Switch CP host window (must be Net. BSD) • The following environment variables are defined in your login script • • SYS = ${MSR}/usr/src/sys CONF = ${SYS}/arch/i 386/conf DKERN =${SYS}/arch/i 386/compile/MSR_SPC PKERN = ${SYS}/arch/i 386/compile/MSR_SPC_PERF • Building a kernel (On Net. BSD) – cp ${MSRTUT}/FS/SPC 24 MB. fs /usr/MSR – Debug kernel 1. cd $CONF; config MSR_SPC 2. cd $DKERN; make depend; make – Performance kernel 1. config MSR_SPC_PERF 2. cd $DKERN; make depend; make Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 12

Preliminaries - Building a kernel • Copy kernel symbols into the filesystem (still on

Preliminaries - Building a kernel • Copy kernel symbols into the filesystem (still on SWCP - Net. BSD) – cp ${MSRTUT}/FS/SPC 24 MB. fs /usr/MSR – su # become the root user • vnconfig -t spc 24 MB -v -c /dev/vnd 0 d SPC 24 MB. fs • mount /dev/vnd 0 d /mnt • ${WUTILS}/bin/Net. BSD/mknl ${DKERN}/netbsd /mnt/netbsd or ${WUTILS}/bin/Net. BSD/mknl ${PKERN}/netbsd /mnt/netbsd • umount /mnt • vnconfig -u /dev/vnd 0 d – exit – cp /usr/MSR/SPC 24 MB. fs ${MSRTUT}/FS/SPC 24 MB. fs Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 13

Preliminaries - SPC Kernel continued • Go to the MSRCP window. Copy kernel and

Preliminaries - SPC Kernel continued • Go to the MSRCP window. Copy kernel and filesystem to the staging area – cd /usr/MSR – cp ${MSRTUT}/FS/SPC 24 MB. fs /usr/MSR – rm /usr/MSR/netbsd. MSR – cp ${DKERN}/netbsd /usr/MSR/netbsd. DEBUG or cp ${PKERN}/netbsd /usr/MSR/netbsd. PERF – ln -s /usr/MSR/netbsd. DEBUG /usr/MSR/netbsd. MSR or ln -s /usr/MSR/netbsd. PERF /usr/MSR/netbsd. MSR Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 14

Preliminaries - MSR Configuration • Go to the MSRCP window – Download kernels and

Preliminaries - MSR Configuration • Go to the MSRCP window – Download kernels and configure switch • cd ${MSR}/cp/configuration • . /Linux/MSR_Config -f config. MSR – set port (SPC) default parameters • cd ${MSRTUT}/cfgs • . /defconfig. cmd – start up GBNSC for use by the GUI monitoring tool • ${WUGS}/bin/Linux/new. GBNSC -P 3551 config. GBNSC. MSR & • Start up the GUI: go to the Data Source Host’s local window – /pkg/jdk 1. 2. 2/bin/java -jar ${MSR}/apps/java. GUI/pubgui. jar – then load the msrgui. txt configuration file and arrange windows Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 15

Preliminaries - Traffic Generation • We will use sendpkts for all exercises in the

Preliminaries - Traffic Generation • We will use sendpkts for all exercises in the MSR tutorial • sendpkts - uses default socket interface and requires configuration of IP and ATM VCs on data sources – ${WUTILS}/bin/Linux/sendpkts -S -n 10 -a 1 –l 192. 168. 216. 2 192. 168. 211. 2 • AAL 5 Generator - uses APIC User mode library and cannot coexist on the same VCIs as sendpkt, – undo atm: su; sh ${WUGRP}/cfgs/IP/Data. Source. atm. undo; exit – ${WUTLS}/AAL 5 Generator -pacer 8 -src 192. 168. 216. 2 -dst 192. 168. 211. 2 -frate 1000 -svci 50 -seconds 20 -packet 20 – Use send. Command utility to change AAL 5 Generator’s output • Sending commands to the ports using sendcmd and monitoring debug messages with monmsgs. – ${MSR}/bin/Linux/monmsgs & – ${MSR}/bin/Linux/sendcmd -p 4 -c policy -s set_dflags -d 0 x 30 -t 10000 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 16

Exercise 1 - Part 1 • Update the Tutorial Directory 1. cd $MSRTUT 2.

Exercise 1 - Part 1 • Update the Tutorial Directory 1. cd $MSRTUT 2. cvs update -A -d • Default routes using the built in Simple route module and table 3. copy $MSRTUT/cfgs/hosts to /etc/hosts on both the SWCP and DSRC hosts 4. in the MSR CP window, Download a DEBUG kernel and verify 5. In the Data Source window generate IP traffic from Data Source (192. 168. 216. 2) to port 5 of the MSR and verify with the GUI $WUTILS/bin/Linux/sendpkts -x 1000 -p 100 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 220. 2 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 17

Exercise 1: Part 1 • Bidirectional traffic using an echo server on SWCP 6.

Exercise 1: Part 1 • Bidirectional traffic using an echo server on SWCP 6. In the SWCP window, start up a IP packet echo server $WUTILS/bin/Net. BSD/serv -p 5050 -e 1 This will echo all packets received back to he sendpkt command 7. In the DSRC window, send packets to the SWCP host (192. 168. 204. 2) $WUTILS/bin/Linux/sendpkts -x 1000 -p 100 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 204. 2 this command sends single cell packets at a rate of 1000 per second. Verify with the GUI that packets are “flowing” in both directions. Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 18

Exercise 1, Part 1: Default Routes 192. 168. 204. 1 P 3 P 1

Exercise 1, Part 1: Default Routes 192. 168. 204. 1 P 3 P 1 192. 168. 205. 1 192. 168. 204. 2 Switch CP Host 192. 168. 208. 1 P 2 vci = 50 P 5 vci = 51 192. 168. 220. 2 Data vci = 50 P 4 P 5 probe (C) 192. 168. 216. 1 P 0 P 4 probe (A) Src Host 192. 168. 224. 1 P 6 probe (B) IP Forwarding Simple, Default routes, at Port 4 192. 168. 216. 1 P 3 Monitoring P 7 Switch Fred Kuhns - 1/11/2022 CP 192. 168. 220. 1 192. 168. 205. 2 192. 168. 216. 2 192. 168. 200. 1 MSR P 2 192. 168. 228. 1 P 7 MSR-# Washington WASHINGTON UNIVERSITY IN ST LOUIS Switch NH MSR (P 3) 192. 168. 216. 2 19

Exercise 1, Bidirectional Traffic Destination Route = Out. VIN = <P 1, S 0>,

Exercise 1, Bidirectional Traffic Destination Route = Out. VIN = <P 1, S 0>, Maps to Port 1, VCI = 50 192. 168. 204. 1 probe (C) 192. 168. 204. 2 serv (echo) Switch CP Host P 1 vci = 50 P 3 P 1 192. 168. 208. 1 P 2 192. 168. 200. 1 MSR P 2 P 0 CP 192. 168. 220. 1 P 5 probe (B) 192. 168. 216. 1 Data sendpkts P 4 probe. P 0 (A) P 4 IP Forwarding vci = 50 Src 192. 168. 216. 2 Host 192. 168. 224. 1 P 6 using FIPL at Port 4 192. 168. 216. 1 P 3 Monitoring P 7 Switch Fred Kuhns - 1/11/2022 192. 168. 228. 1 P 7 MSR-# Washington WASHINGTON UNIVERSITY IN ST LOUIS Switch NH MSR (P 3) 192. 168. 216. 2 20

Exercise 1, Part 2 • Enable the FIPL module and define the routing tables

Exercise 1, Part 2 • Enable the FIPL module and define the routing tables – In the MSRCP window • turn fipl on at port 4 ${MSR}/bin/Linux/sendcmd –p 4 –c policy –s set_fipl –t 10000 • Install routes port 4, add route to port 5, subport 0 ${MSR}/bin/Linux/fip –s –p 4 Enter command (h for help): a 192. 168. 220. 0/24 320 – Verify, in the DSRC Window execute the command • $WUTILS/bin/Linux/sendpkts -x 1000 -p 100 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 220. 2 • Verify traffic follows correct route with the GUI Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 21

Exercise 1, Part 3 • Add routes from port 4 to port 1, subports

Exercise 1, Part 3 • Add routes from port 4 to port 1, subports 0 and 1 – in the MSRCP window • add routes to existing fip session Enter command (h for help): a 192. 168. 204. 0/24 64. . . Enter command (h for help): a 192. 168. 205. 0/24 65 • quite fip Enter command (h for help): quite • Define the return routes from port 1 to port 4 – in the MSRCP window • To simplify the process, the script fipl. cmd enables fipl and defines default routes to all virtual interfaces. $MSRTUT/cfgs/fipl. cmd port 1 or to enable fipl and define routes on all ports $MSRTUT/cfgs/fipl. cmd Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 22

Exercise 1, Part 3 • Send packets from the data source (DSRC) to the

Exercise 1, Part 3 • Send packets from the data source (DSRC) to the Switch CP host (SWCP) at its alias IP address on subnet 192. 168. 205. – Open a second local window on the data source host – in one window send packets to 192. 168. 204. 2 • $WUTILS/bin/Linux/sendpkts -x 1000 -p 100 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 204. 2 – in the other window send packets to 192. 168. 205. 2 • $WUTILS/bin/Linux/sendpkts -x 1000 -p 100 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 205. 2 – Verify bidirectional traffic using the GUI - the echo server should still be running on the switch CP host. Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 23

Exercise 1, Part 3: Sub. Ports Returning traffic not shown 192. 168. 204. 2

Exercise 1, Part 3: Sub. Ports Returning traffic not shown 192. 168. 204. 2 probe P 3 (C) P 1 Switch vci = 50 CP Host 192. 168. 205. 2 Data vci = 50 192. 168. 205. 1 192. 168. 208. 1 P 2 192. 168. 200. 1 MSR P 2 P 5 probe (B) 192. 168. 216. 1 P 4 P 0 probe P 4 (A) 192. 168. 224. 1 P 6 192. 168. 216. 1 P 3 Monitoring P 7 Switch Fred Kuhns - 1/11/2022 CP 192. 168. 220. 1 Src Host P 1 P 0 vci = 51 192. 168. 216. 2 Destination Route = Out. VIN = <P 1, S 1>, Maps to Port 1, VCI = 51 192. 168. 204. 1 192. 168. 228. 1 P 7 MSR-# Washington WASHINGTON UNIVERSITY IN ST LOUIS Switch NH MSR (P 3) 192. 168. 216. 2 24

Exercise 2: Fair Queuing • In SWCP window, stop the echo server (do a

Exercise 2: Fair Queuing • In SWCP window, stop the echo server (do a ^C in the window) – Restart the server but without the echo option $WUTILS/bin/Net. BSD/serv -p 5050 -e 0 • Set interface and internal rates (internal rate includes a speed advantage) – in the MSRCP window $MSR/bin/Linux/sendcmd -p 1 -c policy -s set_trate -d 10000 -d 150 -t 10000 -w info 0) 50000 (0 xc 350) # G = Max rate for APIC interface 1) 10000 (0 x 2710) # T = Total Rate = Link Rate + Internal Rate 2) 4000 (0 xfa 0) # L = Link Rate (aka External rate) 3) 150 (0 x 96) # S’ = Speedup factor (percent) 4) 6000 (0 x 1770) # Internal Rate (port to port rate) Washington – All rates- 1/11/2022 are in Kbps. Fred Kuhns 25 WASHINGTON UNIVERSITY IN ST LOUIS

Exercise 2: Fair Queuing • Default behavior is effectively a FCFS, tail drop packet

Exercise 2: Fair Queuing • Default behavior is effectively a FCFS, tail drop packet scheduler. In the two Data source windows, send traffic and observe packet scheduling behavior in the GUI – turn on source 1, approx 3. 4 Mbps $WUTILS/bin/Linux/sendpkts -c -x 8000 -p 100 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 204. 2 – in other window turn on source 2, approx 2. 5 Mbps $WUTILS/bin/Linux/sendpkts -c -x 6000 -p 100 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 205. 2 • With monitoring the GUI, turn on Queue State DRR – In the MSRCP window, send command to enable qsdrr on port 1 $MSR/bin/Linux/sendcmd -p 1 -c policy -s set_ps -d 2 • The two flows not fairly share available BW, go boack to the FCFS scheduler (in the MSRCP window) – $MSR/bin/Linux/sendcmd -p 1 -c policy -s set_ps -d 0 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 26

Exercise 3: Plugins • Compiling and downloading a plugin – in the SWCP window

Exercise 3: Plugins • Compiling and downloading a plugin – in the SWCP window (Need Net. BSD), build the object file (combined. o) cd ${MSR}/rp/plugins/msr_template make – Then in the MSR CP window, download plugin to running SPC kernel (msr_template is hte entry point name) cd ${MSR}/rp/plugins/msr_template setenv WU_ARL_ROOT $WUARL $WUTILS/bin/Linux/plugin. Download -p 5 -e msr_template -s combined. o Plugin successfully loaded with module ID: 0 – The downloader prints out the plugin id number. You will need this in later commands. Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 27

Exercise 3: Plugins • Next, turn on debug messages for the plugin, classifier and

Exercise 3: Plugins • Next, turn on debug messages for the plugin, classifier and pcu modules – In the MSR CP window $MSR/bin/Linux/sendcmd -p 5 -c set_debug -l verbose -m plugin -m ctl -m pcu -m classify ## Create an instance of the plugin • Turn on the general match classifier – In the MSR CP window $MSR/bin/Linux/sendcmd -p 5 -c policy -s set_gen -d 1 • Create one instance of the plugin – In the MSR CP window $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s create -i 100 -w info this creates instance number 0 of the plugin (see debug messages or the return value with -w info is used with the sendcmd command) Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 28

Exercise 3: Plugins • For a plugin to be called, it must be bound

Exercise 3: Plugins • For a plugin to be called, it must be bound to either a general or exact match filter. In this exercise we use the general match filters - the exact match interface is still “sensitive” – Now create a general match filter that the plugin will be bound to. – addfltr - Add fltr: gid, flags, src/msk, sp, dst/msk, dp, pr – gid = 0 for general match and 1 for exact match – use flags = 0 and set filter id to 0 for the first filter – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s addfltr -g 0 -f 0 -F 0 -n 0 -d 0 -n 192. 168. 220. 0 -n 255. 0 -d 0 -f is the filter id for use when we bind the plugin This will match any packets with a destination network prefix equal to 1923. 168. 200. 0/24. Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 29

Exercise 3: Plugins • Now that we have a plugin instance and a general

Exercise 3: Plugins • Now that we have a plugin instance and a general match filter is installed, we need to bind the plugin instance to the filter – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s bind -i 0 -g 0 -f 0 This binds plugin instance ID 0 to general match filter ID 0. • Send a message to the bound plugin. The plugin will both printout and return the number of packets it has seen – $MSR/bin/Linux/sendcmd -p 5 -c rp_inst -d 0 • Send packets that will match the filter. – In one of the Data Source windows, send 10 packets $WUTILS/bin/Linux/sendpkts -n 10 -a 1 -S -s 5050 -l 192. 168. 216. 2 192. 168. 220. 2 • Then send message to plugin and read the number of packets – MSR/bin/Linux/sendcmd -p 5 -c rp_inst -d 0 -w info Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 30

Exercise 3: Plugins • Get a list of loaded classes, instances and filters -

Exercise 3: Plugins • Get a list of loaded classes, instances and filters - prints to SPC window – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s clist -t 100000 -w info – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s ilist -t 100000 -w info – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s flist -g 0 -w info • Unbind the instance – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s unbind -i 0 -g 0 -f 0 • Free the instance – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s free -i 0 • Remove general match filter – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s remfltr -f 0 -g 0 • Unload a plugin (ignore error message) – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s unload -d 0 • Check on plugin status – $WUTILS/bin/Linux/plugin. Stat -p 5 0 Washington Fred Kuhns - 1/11/2022 WASHINGTON UNIVERSITY IN ST LOUIS 31

Exercise 3: Plugins • Download the plugin a second time and create three instances

Exercise 3: Plugins • Download the plugin a second time and create three instances – cd $MSR/rp/plugins/msr_template/ – $WUTILS/bin/Linux/plugin. Download -p 5 -e msr_template -s combined. o – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s create -i 100 -w info • Create three filters – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s addfltr -g 0 -f 1 -F 0 -n 0 -d 0 -n 192. 168. 220. 0 -n 255. 0 -d 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s addfltr -g 0 -f 1 -F 0 -n 0 -d 0 -n 192. 168. 221. 0 -n 255. 0 -d 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s addfltr -g 0 -f 2 -F 0 -n 0 -d 0 -n 192. 168. 222. 0 -n 255. 0 -d 0 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 32

Exercise 3: Plugins • Bind instances – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s bind

Exercise 3: Plugins • Bind instances – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s bind -i 0 -g 0 -f 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s bind -i 1 -g 0 -f 1 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s bind -i 2 -g 0 -f 2 • Now send packets so that each of the plugins will receive a different number of packets. – In the Date Source Window $WUTILS/bin/Linux/sendpkts -n 5 -a 1 -S -s 5060 -d 5090 -l 192. 168. 216. 2 192. 168. 220. 2 $WUTILS/bin/Linux/sendpkts -n 8 -a 1 -S -s 5060 -d 5090 -l 192. 168. 216. 2 192. 168. 221. 2 $WUTILS/bin/Linux/sendpkts -n 11 -a 1 -S -s 5060 -d 5090 -l 192. 168. 216. 2 192. 168. 222. 2 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 33

Exercise 3: Plugins • Send messages to the different instances – $MSR/bin/Linux/sendcmd -p 5

Exercise 3: Plugins • Send messages to the different instances – $MSR/bin/Linux/sendcmd -p 5 -c rp_inst -d 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_inst -d 1 – $MSR/bin/Linux/sendcmd -p 5 -c rp_inst -d 2 • Print out information about loaded classes, instances and fliters: – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s clist -t 100000 -w info – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s ilist -t 100000 -w info – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s flist -g 0 • Unbind instances – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s unbind -i 0 -g 0 -f 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s unbind -i 1 -g 0 -f 1 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s unbind -i 2 -g 0 -f 2 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 34

Exercise 3: Plugins • Free instances – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s free

Exercise 3: Plugins • Free instances – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s free -i 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s free -i 1 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s free -i 2 • Remove filters – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s remfltr -f 0 -g 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s remfltr -f 1 -g 0 – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s remfltr -f 2 -g 0 • Unload class – $MSR/bin/Linux/sendcmd -p 5 -c rp_pcu -s unload -d 0 Fred Kuhns - 1/11/2022 Washington WASHINGTON UNIVERSITY IN ST LOUIS 35