1 / 44

WUGS, APIC and SPC Tutorial Exercises John DeHart Washington University jdd@arl.wustl

WUGS, APIC and SPC Tutorial Exercises John DeHart Washington University jdd@arl.wustl.edu http://www.arl.wustl.edu/~jdd. Exercises – General Info. PLEASE READ THROUGH ALL THE SLIDES TITLED “Exercises – General Info” BEFORE BEGINNING THE EXERCISES Five groups Each Group will work with:

lbrungardt
Télécharger la présentation

WUGS, APIC and SPC Tutorial Exercises John DeHart Washington University jdd@arl.wustl

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WUGS, APIC and SPC Tutorial Exercises John DeHart Washington University jdd@arl.wustl.edu http://www.arl.wustl.edu/~jdd

  2. Exercises – General Info • PLEASE READ THROUGH ALL THE SLIDES TITLED “Exercises – General Info” BEFORE BEGINNING THE EXERCISES • Five groups • Each Group will work with: • 2 Hosts • 1 NetBSD • 1 Linux • 1 WUGS Switch • 1 MSR • WUGS populated with 8 SPCs • CP: Linux Host • The MSR will only be used toward the end • Each group will have its own directory tree • Each group will have its own login

  3. Exercises – General Info • Your directories are already populated with the wu_arl tree • We will have already done: • cd ~/wu_arl • ./Make.script depend • ./Make.script install • This builds all the utilities • We will use some predefined environment variables: • setenv WUARL ~/wu_arl • setenv WUTUT $WUARL/TUTORIAL/ • setenv WUGSTUT $WUTUT/wugs_apic_spc • <and a lot more…>

  4. Exercises – General Info • The Exercise instructions will refer to • Linux Host: Use this as your base machine: then ssh to others • NetBSD Host • MSR CP • MSR Serial Line Linux Host • MSR Serial Line NetBSD Host • Hostnames for your group are in the following table:

  5. Exercises – General Info • The tip and cu commands will make sense when it is time to use them. • root passwords: TutR00T (those are zeros)

  6. Exercises – General Info • Simple WUGS Connections • Jammer Procedures • APIC and IP Configurations • WUGS Monitoring • Traffic Generation: AAL5Generator • Boot the SPC: AAL5Download • Boot the MSR: MSR_Config • SPC Kernel Building

  7. P1 P4 Exercise 1: Simple WUGS Connections • Configure the WUGS switch for IP connectivity between two Hosts • The Hosts are already configured, you just need to provide the ATM connectivity. • check that the IP addresses on your ATM interfaces agree with figure below • Linux: > /sbin/ifconfig atm0 • NetBSD > /sbin/ifconfig apic0 • Try pinging them before you configure the connections: • From Linux Host: > ping –n 192.168.10.1 • From NetBSD Host: > ping –n 192.168.10.2 NetBSD Host Linux Host VCI 100 VCI 100 192.168.10.1 192.168.10.2 WUGS

  8. Exercise 1 (Continued) • Start newGBNSC.init on your Linux Host • cd $WUGSTUT/cfgs/WUGS • $WUGS/bin/Linux/newGBNSC.init –P3551 –init init.switch config.GBNSC.port4 & Defined a UNI link on port 0 Defined a UNI link on port 1 Defined an NNI link on port 2 Defined a UNI link on port 3 Defined an NNI link on port 4 Defined an NNI link on port 5 Defined an NNI link on port 6 Defined an NNI link on port 7ATMCard: trying to open connection on interface: atm0 Switch controller for GBN switch 0.1 Controller is READY Switch is ALIVE Switch has 8 Ports Switch has 73267689.428764 Hz ClockRate CP connected to IPP 4 OPP 4 Control path to the switch via port 4 on VPI/VCI 0/32 Control path from the switch via port 4 on VPI/VCI 0/32 GBNSC is listening on TCP Port 3551

  9. Exercise 1 (Continued) • Run Jammer on your NetBSD Host • cd $WUGSTUT/cfgs/WUGS • $WUGS/bin/NetBSD/Jammer 0.1 <Linux Host name> 3551 Enter command: ping sm Ping Operation Completed Successfully Enter command: reset sm Enter command: Reset Operation Completed Successfully • You can also run newGBNSC.init on your NetBSD Host • what is the difference between these two files • config.GBNSC.port1 • config.GBNSC.port4 • And you can run Jammer from either host… • It can run on the same machine as newGBNSC.init or anywhere…

  10. Exercise 1 (Continued) • Write MR 2 for each port your hosts are on • set the bits for softwareLinkEnable and setSoftwareLinkEnable • to see what the MR currently holds, do this: Enter command: read mr 1 2 • then do this for port 1 Enter command: write mr 1 2 • it will prompt you for each field in the MR • fill them in with what you saw from the read mr and set the two fields mentioned above to 1. • For your other port try doing the write mr with all those fields on one command line: Enter command: write mr 4 2 128 32 0 255 1 …… • After you are done, read both of them to verify: Enter command: read mr 1 2 Enter command: read mr 4 2

  11. Exercise 1 (Continued) • Write VPXT 0 for each port your hosts are on • set the VPT bit • nothing else matters! Enter command: write vpxt • it will prompt you for each field in the VPXT • fill them in with 0’s except for the vpt bit, set that to 1. • For your other port try doing the write vpxt with all those fields on one command line: Enter command: write vpxt 4 0 0 0 0 0 0 0 0 0 0 1 0 0 …… • After you are done, read both of them to verify: Enter command: read vpxt 1 0 Enter command: read vpxt 4 0

  12. Exercise 1 (Continued) • Write VCXT 100 for each port your hosts are on • set the values like this (# and after are just my comments): bi = 1 # Busy Idle bit. 1  active entry rc = 2 # Routing Control: 2  route Copy 1 d = 1 # Data/Control: 1 data cells cyc1 = 0 # Recycle for Copy1: 0  OPP will send Copy1 out on the link cyc2 = 0 # Recycle for Copy2: 0  OPP will send Copy2 out on the link cs = 0 # Continuous Stream: 0  Discrete Traffic (lower priority in OPP buffer) ud1 = 0 # Upstream Discard for Copy1: 0  Do not do upstream discard in OPP ud2 = 0 # Upstream Discard for Copy2: 0  Do not do upstream discard in OPP sc = 0 # Set CLP Bit: 0  Do not set CLP bit in cells vpt = 0 # Virtual Path Termination: 0  this entry does not terminate a VPI rco = 0 # ReCycle Only: 0  This entry can be used for link traffic and recycle traffic br = 0 # Bypass Resequencer: 0  cells will go through the resequencer in the OPP mapt1vpi = 0 # Map Copy1 VPI: Copy1 cells will leave with VPI=0 mapt1vci = 100 # Map Copy1 VCI: Copy1 cells will leave with VCI=100 bdi1 = 0 # Block Discard Index for Copy1: Label for block discard features mapt2vpi = 0 # Map Copy1 VPI: Copy2 cells will leave with VPI=0 mapt2vci = 0 # Map Copy1 VPI: Copy2 cells will leave with VPI=0 bdi2 = 0 # Block Discard Index for Copy1: Label for block discard features adr1 = (destination port) # Destination Port for Copy1 cells adr2 = 0 # Destination Port for Copy2 cells

  13. Exercise 1 (Continued) • Now you should be able to ping • from NetBSD Host • ping –n 192.168.10.2 • from Linux Host • ping –n 192.168.10.1 • if/when it does not work: • in Jammer try reading mr 4 and mr 15 on each port. • mr 4 contains the receive cell counter for the port • mr 15 contains the transmit cell counter for the port • read the VCXT cell counters for VCI 100 at each port Enter command: read vcxtcc 1 100 • try re-reading mr 2, vpxt 0 and vcxt 100 to verify that they are all set properly.

  14. Exercise 1 (Continued) • When it does work try this: • kill you ping • read mr 4 and 15 on each port • do each twice to make sure the counters are not changing. (do they?) • write the values down to compare later • read vcxtcc 100 on each port • do each twice to make sure the counters are not changing. (do they?) • write the values down to compare later • try this ping from your Linux Host • ping –n –c 10 –s 4 192.168.10.1 • try ‘man ping’ if you don’t know what the options mean • wait for the command to complete • repeat the reads from above (mr 4, 15 and vcxtcc 100) • Do the counts make sense? • Are there any control cells being counted in there? • Can you see advantages to each of “read vcxtcc” and “read mr” • How many ATM cells would be in a ping with size (-s) 4? • Try pings with different values with the -s

  15. Exercise 2: Jammer Procedures • Basically what we did in Exercise 1 was: • Configured the Port • write mr <port> 2 • write vpxt <port> 0 • Configured the VCXT entry: • write vcxt <port> 100 • Now we want to generalize that with Jammer procedures

  16. Exercise 2: (continued) • There is a Jammer procedure template in • $WUGSTUT/cfgs/WUGS/template.js • Take a look at it. • Try running the template on your Linux Host: • $WUGS/bin/Linux/Jammer 0.1 <Linux Host name> 3551 Enter command: include template.js Enter command: template(1,2) Enter command: quit • Try running the template this way: • $WUGS/bin/Linux/Jammer 0.1 <Linux Host name> 3551 template.js Enter command: template(1,2) Enter command: quit • Now, edit the file template.js and uncomment all the lines that look like these (6 of them): # set print quiet_ack # set print normal • Then run it again. Notice any difference?

  17. Exercise 2 (continued) • Write two procedures: proc initPort(int port) proc uniDirConn(int port1, int vci1, int port2, int vci2) • Put them both in a file utils.js • When you get them working you should be able to redo Exercise 1 with just this: Enter command: reset sm Enter command: include utils.js Enter command: initPort(1) Enter command: initPort(4) Enter command: uniDirConn(1,100,4,100) Enter command: uniDirConn(4,100,1,100) • Then you should be able to do your pings again. • The “reset sm” above resets the switch and clears all your previous WUGS connections • You might want to start a “ping –n <ip_address>” before you do the “reset sm” and leave it running to see when it starts succeeding…

  18. Exercise 2 (continued) • It might also be useful to have this procedure: proc biDirConn(int port1, int vci1, int port2, int vci2) • Add it to your file utils.js if you want • We will use utils.js later

  19. Exercise 3: APIC and IP Configurations • For Exercises 1 and 2 we preconfigured your Hosts for you • Now we want you to perform that configuration • As root on your NetBSD Host and your Linux Host, reboot each of them • When they are done rebooting, log back in

  20. P1 P4 WUGS VCI 50 VCI 50 NetBSD Host Linux Host 192.168.204.2 192.168.216.2 Exercise 3: APIC and IP Configurations • For this exercise we want to configure them like this: • We’ll take one host at a time, first the NetBSD Host…

  21. Exercise 3A: NetBSD Device and IP Config • Referring to the APIC Software talk from this morning • As root: • use ifconfig to configure the APIC with an IP address: 192.168.204.2 • use atm_ifconfig to configure VCI 50 for AAL5 • watch out for hexidecimal versus decimal!!! • use atm_ifconfig to configure VCI 32 for AAL0_CELL use • newGBNSC.init needs this one • use route add to configure a route to your router 192.168.204.1 using VCI 50 • watch out for hexidecimal versus decimal!!! • Yes, I know the router doesn’t really exist but for now lets pretend… • now add a route for 192.168.216.2 via your router • route add 192.168.216.2 192.168.204.1

  22. Exercise 3B: Linux Device and IP Config • Referring to the APIC Software talk from this morning • As root on your Linux Host: • edit the file /etc/sysconfig/network-scripts/ifcfg-atm0 to set the IPADDR and associated network parameters. • We want this host to have IP address 192.168.216.2 • Configure the device by running: • /etc/init.d/atm start • You should see: Starting ATM demons: [OK] • Now lets kill atmsigd and ilmid • ps –auxwww | grep atmsigd • ps –auxwww | grep ilmid • kill <atmsigd_pid> <ilmid_pid> • Check the device configuration: • ifconfig atm0

  23. Exercise 3B: Linux Device and IP Config • As root on your Linux Host: • use atmarp to configure VCI 50 to connect to your router: 192.168.216.1 • beware of decimal versus hexidecimal • use route add to add a route to 192.168.204.2 via your router

  24. Exercise 3C: Build the Connections • Now using what you learned in Exercises 1 and 2 use the procedures you built to make the necessary connections in the WUGS switch. • Run your newGBNSC.init on your NetBSD Host • Run Jammer on whichever machine you want • Test what you have done with ping. • If it doesn’t work • try using Jammer to read: • Port 1, MR 4 and MR 15 • Port 4, MR 4 and MR 15 • Port 1, VCXTCC for the VCI you are using • Port 4, VCXTCC for the VCI you are using • check your routing table on your hosts: • netstat -nr

  25. Exercise 4: WUGS Monitoring • Now we will monitor the traffic in the WUGS • We will re-use the connections and configurations you build in Exercises 3A, 3B and 3C. • On your Linux Host: • cd $WUGSTUT/cfgs/GUI • /pkg/jdk1.2.2/bin/java –jar $MSR/apps/javaGUI/pubgui.jar

  26. Exercise 4: (Continued) • In the gui, monitor the switch controlled by your NetBSD Host • Here is what we want to monitor • Port 1 Bandwidth without recycling • Port 4 Bandwidth without recycling • Port 1 VCI 50 Bandwidth • Port 4 VCI 50 Bandwidth • Try this ping command as root on your NetBSD Host: • ping –n –f –i 0.1 –s 400 192.168.216.2 • What happens when you try pings with different size arguments (-s #)? • Explore other features of the monitoring gui. • Especially try saving your monitoring configuration to a file, quit, restart the GUI and load your configuration from a file • Try changing the axes • Try placing your mouse over the labels in the right margin.

  27. Exercise 5: AAL5Generator • Now we want to start using AAL5Generator instead of ping for our traffic generation • First, redirect VCI 50 so that • (Port 1, VCI 50) goes to (Port 3 VCI 50), unidirectional • (Port 4, VCI 50) goes to (Port 0 VCI 50), unidirectional • once again, reuse your util.js to do this. • We are purposely not making a complete connection between Port 1 and Port 4 so we can generate a lot of traffic and not swamp the hosts • Monitor the following: • VCI 50 on ports 1 and 4 • OPP Port Bandwidth w/o recycling on ports 3 and 0.

  28. Exercise 5: (continued) • Then on your Linux Host: • cd $WUGSTUT/ • $WUARL/utilities/bin/Linux/AAL5Generator -pacer 8 -src 192.168.216.2 -frate 1000 -dst 192.168.204.2 -svci 50 -seconds 10 -packet 20 • If you get an APIC_SYSCALL error it is probably due to us trying to re-use VCI 50. • This is the UserMode code conflicting with the IP config • What do we need to do about it? • Then when you get it running and it completes, on your NetBSD Host try: • cd $WUGSTUT/ • $WUARL/utilities/bin/NetBSD/AAL5Generator -pacer 8 -src 192.168.204.2 -frate 1000 -dst 192.168.216.2 -svci 50 -seconds 10 -packet 20 • Experiment with the command line arguments for AAL5Generator • especially, “-packet #”, “-frate #”, • try “-kbits #” in place of “-frate #”

  29. Exercise 5: (continued) • Run one of your AAL5Generators but change the “-seconds 10” to “-seconds 0” • That causes it to run forever • Then, use sendCommand utility to change AAL5Generator’s output • run your AAL5Generator with –seconds 0 to have it run forever while you do this • Try these examples from your NetBSD Host: • Replacing <host> with the hostname where AAL5Generator is running • $WUARL/utilities/bin/NetBSD/sendCommand –p 4444 <host> “Packet Rate 10000” • $WUARL/utilities/bin/NetBSD/sendCommand –p 4444 <host> “Stop” • $WUARL/utilities/bin/NetBSD/sendCommand –p 4444 <host> “Start” • $WUARL/utilities/bin/NetBSD/sendCommand –p 4444 <host> “DestAddr 192.168.221.2” • Changing destination address may cause some dropped packets • we are changing the IP header on the fly and must update the IP header checksum as well. We can not update the destination address and the checksum as an atomic operation so a packet could go out with a bad checksum. If that packet were going to an actual router, the router would drop it. • Look in $WUARL/utilities/APIC/AAL5Generator/commands.h • the full list of command verbs

  30. Exercise 5: (continued) • Experiment with the AAL5Generator, sendCommand and the GUI options: • Try changing the Y-Axis to cells/sec and Mb/s • and see how they each correlate to with your AAL5Generator settings for “-frate”, “-kbits”, and “-packet” • Try this while loop • while 1 • $WUARL/utilities/bin/NetBSD/sendCommand –p 4444 <host> “Packet Rate 10000” • sleep 3 • $WUARL/utilities/bin/NetBSD/sendCommand –p 4444 <host> “Packet Rate 10000” • sleep 3 • end

  31. Exercise 6: Boot the SPC: AAL5_Download • Please refer to the diagram for the Full Configuration for your group. • Pay close attention. We are going to be using your SWITCH and your MSR.

  32. Exercise 6: (continued) • Open a serial connection to SPC4 • in a window logged in to your NetBSD Host as root: • <use the tip command listed in the table at start of Exercises> • Start a newGBNSC.init on your MSR CP: • Review how you started newGBNSC.init back in Exercise 1 • Look at the files in $WUGSTUT/cfgs/WUGS • Look at diagram for your full configuration • Figure out which config.GBNSC.port# file to use

  33. Exercise 6: (continued) • Using Jammer and your util.js procedures set up the following connections (pay attention to the directional arrows): • (Port 0, VCI 21)  (Port 4, VCI 0x321) • (Port 0, VCI 21)  (Port 4, VCI 25) • (Port 0, VCI 24)   (Port 4, VCI 23) • The you should be able to download and boot from your MSR CP: • cd $WUARL/utilities/bin/Linux • ./AAL5_download.sh 1 /usr/MSR/netbsd.MSR /usr/MSR/ SPC24MB.fs 21 21 23 24 25 • Take a look at the script, AAL5download.sh, to see what it does. You could have also run all the commands in it separately. • Note that the Kernel and File System are downloaded separately.

  34. Exercise 7 Boot the Full MSR: MSR_Config • Boot your MSR (using Existing Debug Kernel) • Reset your MSR (Hardware Reset) • Identify which WUGS switch in the cabinet is your MSR • Push reset button on front of WUGS • Open serial connections to two SPCs • in a window logged in to your SL NetBSD Host as root: • (see the table at beginning of handouts to see which machine it may not be the same as your “NetBSD Host”) • <use the tip command listed in the table at start of Exercises> • in a window logged in to your SL Linux Host as normal user: • (see the table at beginning of handouts to see which machine it may not be the same as your “Linux Host”) • <use the cu command listed in the table at the start of Exercises> • for now you should see nothing in these windows…

  35. Exercise 7 (continued) • Boot your MSR (continued) • Use MSR_Config to boot and configure the MSR • login in to your MSR CP • Kill any newGBNSC that might be running • cd $WUARL/msr/cp/configuration • ./Linux/MSR_Config –f config.MSR • < this will take a minute or two…> • Check for booting kernel via serial ports (tip and/or cu) • make sure it comes to a login prompt • It occasionally hangs after “init: copying out path ‘/sbin/init’ 11 WHY? We are still trying to figure this out. If it happens, kill and restart MSR_Config. • Once your MSR is booted, start newGBNSC • newGBNSC, NOT newGBNSC.init • what is the difference?

  36. Exercise 7 (continued) • We want these connections in your SWITCH • You may still have them from a previous exercise… • (Port 1, VCI 50) goes to (Port 3 VCI 50), unidirectional • (Port 4, VCI 50) goes to (Port 0 VCI 50), unidirectional • once again, reuse your util.js to do this.

  37. Exercise 7 (continued) • Test with traffic generator and monitoring gui • On your SWITCH (I.e. just before your MSR/SPC), monitor the following: • Port 4, VCI 50 • Port 0, OPP Bandwidth • On your MSR (I.e. just after your MSR/SPC), monitor the following: • Port 4, IPP Bandwidth • Port 4, VCI 47 • You’ll learn more about the MSR tomorrow and the 47 will make sense to you. • You should be able to Monitor all on one graph… • You also might want to change the names of what you are monitoring: • double click on the parameter names in the right monitor • (continued on next slide)

  38. Exercise 7 (continued) • For your AAL5Generator command, use a destination address of 192.168.228.2. (run AAL5Generator on your Linux Host) • How many 1 cell packets can it forward? • increase the packet rate until the lines separate • Remember this is a DEBUG Kernel • Performance Kernel next.

  39. Exercise 8: SPC Kernel and FS Manipulations • Build a Performance (no debug turned on) MSR Kernel • On your NetBSD Host: • cd $WUARL/msr/usr/src/sys/arch/i386/conf • config MSR_SPC_PERF • cd ../compile/MSR_SPC_PERF • make depend • make

  40. Exercise 8: SPC Kernel and FS Manipulations • As root: Place symbol-only version of kernel in file system, you need to do this each time you build a new kernel to be downloaded: • cp $WUGSTUT/FS/SPC24MB.fs /usr/tmp • vnconfig –t spc24MB –v –c /dev/vnd0d /usr/tmp/SPC24MB.fs • mount /dev/vnd0d /mnt • $WUARL/utilities/bin/NetBSD/mknl \ $WUARL/msr/usr/src/sys/arch/i386/compile/MSR_SPC_PERF/netbsd \ /mnt/netbsd • touch /mnt/THIS_IS_MY_FILE • umount /mnt • vnconfig –u /dev/vnd0d • As normal user: : • cp /usr/tmp/SPC24MB.fs $WUGSTUT/FS/ • Watch for error messages when you do all of the above. • The reason for copying the FS file to and from /usr/tmp is that the file system you are working on is NFS mounted and we do not have root access to files on it. So we copy it to a local file system where we do have root access to the files. • The touch command above will just help convince yourself that you changed the file system.

  41. Exercise 8 (continued) • On your MSR CP machine • cp $WUARL/msr/usr/src/sys/arch/i386/compile/MSR_SPC_PERF/netbsd /usr/MSR/netbsd.MSR • cp $WUGSTUT/FS/SPC24MB.fs /usr/MSR • We use /usr/MSR (a local disk, not NFS) so that the downloads will go faster • Download and boot using MSR_Config • You may need to kill the newGBNSC if it is still running on your MSR CP machine • When it is done booting, restart the newGBNSC • Check your cu window(s). Linux kills them when the other end is reset. • When the SPC boots, log in as root (no password) on each of your serial consoles • Look for your file “THIS_IS_MY_FILE” • what directory should it be in? • Are you surprised that it is on both SPCs?

  42. Exercise 8 (continued) • Retest with traffic generator and monitoring gui • On your SWITCH, monitor the following: • Port 4, VCI 50 • Port 0, OPP Bandwidth • On your MSR, monitor the following: • Port 4, IPP Bandwidth • Port 4, VCI 47 • You’ll learn more about the MSR tomorrow and the 47 will make sense to you. • For your AAL5Generator command, use a destination address of 192.168.228.2. • How many 1 cell packets can it forward?

  43. Notes

  44. Notes

More Related