InterWorking Labs is updating its Community Forum!
Our Community Forum discussions are listed below.
If you need help ... Contact Us
Many users who place their Maxwell G's into a lab find it inconvenient to operate the Maxwell G in the lab itself. So they exporting a desktop onto a Windows or Linux desktop computer in a more comfortable location.
The best tool for this is VNC.
VNC requires that the user login to a command prompt (usually via SSH or via a locally attached keyboard/monitor) in order to initiate a VNC server. The server, when started, announces address and port/desktop number information that needs be fed to the VNC client.
That server can then be accessed from a VNC client using that number information.
Getting VNC started can be somewhat difficult, particularly if there have been previous VNC sessions.
To make things easier we have created a shell script that will clean out an stale VNC server information and start a new, clean VNC service.
That script is in a file named /home/maxwell/bin/startvncserver
However due to an error in one of the programs we use when setting up a new Maxwell G the content of that script file was damaged.
As of this date - May 7, 2013 - we have corrected this for new machines.
However, this file needs to be manually replaced on older machines.
Below is a copy of the corrected script.
Please save a copy of the damaged script and then replace the contents of the file /home/maxwell/bin/startvncserver with the contents shown below
#!/bin/bash
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
export PATH
echo "Please ignore any warning messages about the non-existence of"
echo "xauth/.Xauthority files."
for s in `vncserver -list | awk '/^:([[:digit:]*])/ { print $1; }'` ; do
vncserver -kill ${s}
done
if [ -d ~/.vnc ] ; then
rm -f ~/.vnc/*log
fi
vncserver -geometry 1240x960
Question: (by Shamrock) When I install a keyboard, video, and mouse to boot up Maxwell G to get DHCP to give it an IP address, I notice that some strange characters, that look like Russian (or some other garbage characters) appear on the screen. If I ignore this, the Maxwell G boots up correctly, but what is causing it and is it a real problem?
Answer: (Deepak N.) There are two issues:
#1 During the boot-up sequence some strange characters are displayed on the video screen for a few seconds.
These are transient ? normal, correct video will resume within a few seconds. (The resumption of proper video operation may be masked if the video re-synchronization issue, described in the next section occurs.)
This issue is caused by a bug in the Linux kernel and its start-up scripts.
#2 Some video monitors have difficulty synchronizing with the video output of the Maxwell Pro and Maxwell G.
On some older video monitors the monitor loses synchronization with the Maxwell Pro or Maxwell G during the boot-up sequence.
Many monitors indicate this by constantly switching between input sources looking for a signal, other monitors display an indication saying that they can find no input signal. This occurs mainly with older design flat-screen monitors.
This condition usually may be cleared by done any of the
following:
-Power cycling the video monitor off then on.
-Using a button on the monitor to manually switch to an unused video
source and then back to the source used by the Maxwell.
Question: (by Shamrock) I'm trying to establish two different UDP filters on two different bands. When I submit a filter to be active individually the network traffic is filtered correctly, but when I activate both filters at the same time one of the filters does not see the desired traffic. What am I doing wrong?
Answer: (by MrFixIt) I think no one at InterWorking Labs answered the question because no one understood it :-) Let me give you an example of UDP traffic.
If you are going to filter all UDP traffic that has to happen in one band. However you impair it in that band (e.g. drop it, duplicate it), it is impaired and exits out the data interface. You cannot do further impairments in another band.
Now, you could pick another band and do some impairments on the non-UDP traffic, such as TCP, so that you are applying drops to all UDP traffic from A to B in band one, and then re-ordering to all TCP traffic from A to B in band two. Does this make sense?
BTW ... there's a good example in the Filters section of the User Guide on the website under Support.
Question: (by Shamrock) Is there a way that I can send commands to Mini Maxwell remotely? Or do I have to use the GUI? Is there any type of command line interface that I could use?
Answer One:(by Sapient) You can actually set up commands in a spreadsheet and then run that remotely. There's a video called:
"Increasing Network Packet Loss Rate Automatically"
Answer Two: (by MrFixIt) Actually there is also a Python program that you can use. You need to download it from the Customer Downloads section at support.iwl.com.
Basically, you can bypass the Mini Maxwell web pages and have the Python program take control. You can start the program from a CLI and it works with any framework written in Tcl, Perl, Python, etc.
You need Rev 12 or later of Mini Maxwell and Python v2.6 or later.
Question: (by Shamrock) We have been successfully using Mini Maxwell, but sometimes the little box gets misplaced! It would be better in our environment if we had a rack mount package for Mini Maxwell to avoid "shrinkage". Anyone know?
Answer: (by Rico) Hi Shamrock,
My name is Rico Sumarna and I am the Accounts Executive here at IWL. I am very please to announce that we have a rack mount version of Mini Maxwell!
This configuration will allow you to bolt Mini Maxwell directly to your rack and will help you avoid "shrinkage". Your Mini Maxwell will now be safe and secure.
If you would like to discuss this option further please give me a call at 831-460-7010 x102.
I look forward to hearing from you.
Rico
Answer: (by ChrisW) InterWorking Labs has tested Maxwell Pro with these monitors:
ASUS VK246H Samsung T240HD
We believe any monitor manufactured within the last five years should work fine. Older monitors will not work.
Question: (by DKorzuchin) Hi, I have a question about the Maxwell pro--I want to filter traffic based not only on the ip address of two machines but particular ports as well. Is this possible?
Answer: (by JimLogajan) You can create a filter matching one, two, or a range of port numbers (where the range is set using a bit mask) by setting parameters in the "IPv4 and LAN Filter" or "IPv6 and LAN Filter" dialogs available under the "Flow Selector" dialog.
Alternately, you can use the "Match Expression" dialog to filter on up to four source or destination ports by setting the appropriate offset into the TCP or UDP headers and setting the desired match values.
If that isn't enough, you can create up to 64 flows (click on the root "System" node in the selection tree in the left panel of the main GUI and set the "Number of Flows" field,) with each flow set up with a subset of the desired ports using one of the previous mechanisms. This would provide up to 256 ports to be selectively chosen for the desired impairments. This approach is somewhat tedious to set up from the GUI but generally much easier using a script that takes advantage of the Remote API.
Question: (by Choco) I want to customize my emulated burst traffic by regularly dropping packets for every burst. How do I tell maxwell, for example, that I want it to drop x packets every 10 packets
Answer: (by Jim Logajan) You can perform periodic impairments like that using Maxwell's "Flow Triggering" mechanism. It allows you to define a flow that impairs every nth packet that matches the flow. For example, to drop X packets after every 10 packets, you would first select the "Flow Selector" branch for a flow (such as Flow 0). Then place a check mark in one of the options that are labeled "LAN Filter", such as "IPv4 and LAN Filter".
The "Flow Triggering" button should now be active - clicking it will display the flow triggering dialog.
Select either "Basic" or "TcpUdp" trigger type. The GUI contains an explanation of their meanings; if in doubt select "Basic".
Since you want to drop every 10 packets you would enter 10 into the "Number of Packets in Initial Lull" field. Then enter your X value into the "Number of Packets to Impair" field. If you want the drops to go on forever then leave the "Number of Trigger Repetitions" field at zero.
Now click the "Apply" button to start the filtering. But wait - we haven't actually told Maxwell that we want packets in Flow 0 to be dropped! Click on flow zero's "Drop" branch. Check mark the "Activate Packet Drop" field and enter 100% into the "Drop Probability" field. Maxwell will now begin dropping X packets after every 10 packets.
If you need to narrow the type of packets that are included in the drops you would need to supply additional filter criteria in the "Flow Selector" dialog for that flow.
Question: (by Admin) I have a Maxwell Pro and we are now working with a team in India. I am located in Milpitas California along with the Maxwell Pro. My team in India wants to utilize Maxwell Pro as well.
Is there a way that the Indian team can remotely login to my Maxwell Pro and use it?
Answer: (by Admin) Remote access control could be done using X-Windows, VNC, or via the Maxwell TCP/IP control connection on its default port. Since most likely there are firewalls involved, unless you have a VPN between the two sites, you'll generally need to use something like an ssh tunnel to the desired service port on the Maxwell (i.e. port 6000 for X-Windows, 590X for VNC display X, 7021 for Maxwell TCP/IP) and then have the client connect to the local port that was chosen.
What sort of network connection constraints do you have, what kind of control does the remote site need (running protocol tests, running network impairments, shell command control and/or GUI control) and which of the mechanisms mentioned above, if any, are likely candidates that would fit your needs?
Question: (by Admin for Choco) I would like to test that the sending side sends a PUSH bit in the request packet. Is there a way I can do that without purchasing your TCP test suite (we don't have the budget right now)?
Note that RFC 1122 states:
A TCP MAY implement PUSH flags on SEND calls. If PUSH flags are not implemented, then the sending TCP:
(1) must not buffer data indefinitely, and
(2) MUST set the PSH bit in the last buffered segment (i.e., when there is no more queued data to be sent).
Just trying to run some experiments on that.
Answer: (by Admin) Hi Choco, One thing you could do is play around with the ALTER impairment. You can modify a specific packet right from the UI. I've been using it for various packet manipulations.
Also, I've got the Maxwell TCP Test package and there is a test in there to do what you want. But you can do it with the ALTER impairment.
Question: (by Tiny Timmy) I've been working with the link-up/link-down traps in Net-SNMP, and notice that they only update every 60 seconds.
Supposedly you can overwrite this in the configuration file, but when I have tried to make it every two seconds, it just goes back to 60 seconds. In other words, the settings are not honored.
Has any one figured out a way around this?
Answer One: (by PumpkinJason) Are you saying the traps are delayed while being sent out by your snmpd daemon, or you actually meant the traps are just logged with a delay by snmptrapd?
What configuration directive you used to make it to "2 seconds" interval?
Answer Two: (by TinyTimmy) The problem with net-snmp is that it checks the link status only once every 60 seconds.
That means that if you yank the network cable out you will wait anywhere between 0 and 59.999 seconds before the net-snmp agent emits a link down trap.
Or, if the link is already down and you insert a network cable you wait From 0 to 59.999 seconds before the agent emits a link-up trap. And worse, if you manage to yank the cable and then put it back again so that both of those events occur between the checks by the net-snmp agent, *no* link-down or link-up trap will be emitted at all - only silence.
There are directives in net-snmp to alter that polling period. But they don't work; they do not change the one minute cycle.
This issue has absolutely nothing about a trap receiver - I watched this Emission (or non-emission) of traps using Wireshark.
Answer Three: (by PumpkinJason) I suspect this has something to do with DNS resolution time?
If you are using host domain name for trapsink insnmpd.conf, changeit to IP address to see if it makes any difference?
Answer Four: (by TinyTimmy) I have been using the IP address and the DNS is resolving in a couple of milliseconds, so that is not it.
Answer Five: (by Sandiyago) For the default linkUpDownNotification trap, current Net-snmp implementation polls for link state change every 60 seconds, that likely explains what you observed. An event based mechanism is supposed to appear in a future release.
Answer Six: (by Sandiyago) more reading suggests by using an agent compiled with Event MIB support we may be able to control the polling FREQUENCY:
http://www.net-snmp.org/docs/man/snmpd.conf.html p>
DisMan Event MIB:
linkUpDownNotifications yes
will configure the Event MIB tables to monitor the ifTable for network interfaces being taken up or down,
and triggering a linkUp or linkDown notification as appropriate.This is exactly equivalent to the configuration: notificationEvent linkUpTrap linkUp ifIndex ifAdminStatus ifOperStatus notificationEvent linkDownTrap linkDown ifIndex ifAdminStatus ifOperStatus
monitor -r 60 -e linkUpTrap ""Generate linkUp"" ifOperStatus != 2 monitor -r 60 -e linkDownTrap ""Generate linkDown"" ifOperStatus == 2
It is likely using a different -r x may do the trick. But it may not if the linkDown/linkUp traps are hard-coded to a minimum 60 seconds to avoid the overhead of frequent polling.
Answer Seven: (by TinyTimmy) I was already using the ""monitor"" lines below with -r value of 2 (two seconds).
However, what is useful is to learn that despite what the documentation says in net-snmp about the -r flag controlling the testing interval the fact is that the testing interval is "hard-coded to a minimum 60 seconds".
That means that if one is using net-snmp that the link-up/down traps are really only useful if one doesn't care about things that could occur in less than a minute.
If one is in a security center this means that a bad person could insert a man-in-the-middle box and if the cables are switched quickly that nobody would notice that link-state went down and then came back.
And if one is in a NOC one could miss transient link drops/recovery(indicative of an error condition) unless that condition just happened to occur at the instant net-snmp made its once a minute test.
Question: (by Syed) Hi All, I am trying to issue " show ip route " to the CISCO or any devices cli prompt.
Is there any method or API available in silvercreek to send CLI commands using tcl script?
Please help me if any way to access remote CLI using ip address?
-Thanks,
Syed
Answer One: (by Sandiyago) Since SilverCreek
is a Tcl interpreter so I believe you can use whatever method (telnet,
ssh ) available in Tcl language to connect to the remote server. For
example, Telnet http://wiki.tcl.tk/684
You can consider using expect (http://www.nist.gov/el/msid/expect.cfm) to automate login that requires password, or set up public key authentication to avoid entering password (ssh)..
Answer Two: (by Syed) Whether the agent ip and telnet/ssh ip address should be same?
Answer Three: (by Sandiyago) It may or may not be the same depending on the target that you are trying to log in, right? The IP address of telnet/ssh used in the script should be the same as that you would type in a shell.
Answer Four: (by Syed) When i try to execute ssh to the ip where the agent is running , i faced below error.
Please help me how to use "spawn" command?
[ERROR] Remarks: An error occurred during executionAnswer Five: (by Syed) I need to execute the expect and spawn commands in silver creek?
invalid command name "spawn"
while executing
"spawn ssh root@$ip"
(file"./testsuite/private-tests/chTest/testSNMP-TE-TNNL-PE-01.tcl"" line 7)
invoked from within
"source $testfile"
#!/usr/bin/expect
set ip 172.23.130.134
set user "root"
set pwd "Welcome123"spawn ssh root@$ip
expect {
-re ".*Are.*.*yes.*no.*" {
send "yes\r"
expect "password:"
send "$pwd\r"
expect "#"
}
"password:" {
send "$pwd\r"
expect "#"
}
}
Answer Six: (by Sandiyago) Spawn is form Expect package, did you install Expect package?
If you are using SilverCreek's Tcl, place the Expect folder under the 'lib' directory. You can see other libraries like "snmptcl", "tkTable" there etc. Alternatively you can place Expect anywhere but update Tcl's "auto_path" so it can be found.
If you are using your own Tcl, then install it as Expect's installation instruction.
The best approach is to use a standard Tcl, install Expect, and make sure it works then place it in your SilverCreek test.
Answer Seven: (by Syed) I have installed expect package in below path:
"C:\Tcl\lib\teapot\package\win32-ix86\lib\Expect5.43.2"
From tclsh ,
% puts $auto_path
C:/Tcl/lib/tcl8.5 C:/Tcl/lib c:/tcl/lib/teapot/package/win32-ix86/lib
c:/tcl/lib/teapot/package/tcl/lib example/example/
%
From Silver creek console ,
Console display active (Tcl8.4.14 / Tk8.4.14)
(SilverCreekMx) 49 % puts $auto_path
{C:/Program Files (x86)/InterWorkingLabs/SilverCreekMx/lib/tcl8.4}
Files (x86)/InterWorkingLabs/SilverCreekMx/bin} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/autoint} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/BWidget-1.4.1} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/compat} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/gdi}{C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/guilib} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/hdc} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/mclistbox-1.02} {C:/Program
Files (x86)/InterWorkingLabs/SilverCreekMx/lib/printer} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/scdb} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/scgui} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/scotty} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/sctest} {C:/Program Files
(86)/InterWorkingLabs/SilverCreekMx/lib/snmptcl} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/snmptest} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/sscgui} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/tablelist} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/TCL8.3} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/tcl8.4} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/timer} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/TK8.3} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/tk8.4} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/tkTable} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/tools} {C:/Program Files
(x86)/InterWorkingLabs/SilverCreekMx/lib/tablelist/scripts},
How i need to add the expect path in to silvercreek auto_path???
Answer Eight: (by Sandiyago) In your script ./testsuite/private-tests/chTest/testSNMP-TE-TNNL-PE-01.tcl, try:
if {[lsearch $::auto_path
""C:/Tcl/lib/teapot/package/win32-ix86/lib"] == -
1} {
lappend ::auto_path "C:/Tcl/lib/teapot/package/win32-ix86/lib"
}
package require Expect
On Linux, try
if {[lsearch $::auto_path ""C:/usr/lib"] == -1} {
lappend
::auto_path "C:/usr/lib"
}
package require Expect
It should also work if you use "C:/Tcl/lib/teapot/package/win32-ix86/lib/Expect5.43.2", but I don't think that's necessary.
Question: (by Syed) When i executed the testcases , it shows that the log is collected at the below location,
C:/Users/sambalam/AppData/Local/Temp/sctmp-5632-test_SNMP-SLSP-PE- 01-32.log
But is it possible to change the default path?
Thanks in Advance.
-Regards,
Syed
Answer Two: (by JimLogajan) Here are two ways to change the default path (the following is based on the operation of the latest release of SilverCreek):
1) Use the GUI menu selection "Tools" -> "Options" to display the Options dialog window. In that window select the "Misc" tab. Near the bottom should be an entry that allows you to select a folder path where the log files are created. Set it to the desired path and click "OK".
2) Set the user environment variable TMP or TEMP so that one of them contains the desired path. The environment variable value will only be used if the GUI options mechanism doesn't set the path.
Setting environment variables on MS Windows varies depending on the version; check Microsoft documentation for guidance. For example, the way such variables are assigned values when using Windows XP is outlined here: http://support.microsoft.com/kb/310519.
Answer One: (by MrFixIt) Lots of people running into this. FlexLM looks for the MAC address on eth0 and nowhere else! Eth0 is usually the first network interface, but newer versions of Linux do things differently. If you go to the directory where the devices are mapped -- could be /etc/config or /etc/iftab or /etc/udev and rename eth1 to eth0, then it should work.
Answer Two: (by Jim Logajan) The following is probably the cause:
Flexlm goes looking for the MAC address on the Ethernet interface named "eth0" and if it doesn't find it, it returns an empty or blank hostid. Most likely your only Ethernet interface was assigned the name "eth1" rather than "eth0".
One way you may be able to rename the interface from "eth1" to "eth0" is to use the Linux "Network" Administration GUI tool (you'll need the root password). In the window that appears you would select on the "Hardware" tab to display a dialog that shows all the interfaces. Select the row with the eth1 device and click on the Edit button. In the dialog box that appears you should see a field that allows you to rename interface to eth0. Just follow through on OKing and saving as indicated. A reboot may not be needed, but probably should be done to insure the change is persistent.
docsDevResetNow OBJECT-TYPE
SYNTAX TruthValue
MAX-ACCESS read-write
STATUS current
DESCRIPTION
?Setting this object to true(1) causes the device to reset.
Reading this object always returns false(2).?
::= { docsDevBase 3 }
So in SilverCreek, you can do a simple SET to reboot the agent automatically snmptcl::snmpset DOCS-CABLE-DEVICE-MIB:docsDevResetNow.0 1
Answer Two: (by Maverick) Thanks!But can I add the same in the Test-> Advanced Configurations: SNMPv3-USM-MIB-> Reboot
i.e. snmptcl::snmpset DOCS-CABLE-DEVICE-MIB:docsDevResetNow.0 1
or just the integer value '1'?
I'm using SilverCreek M3 Build 2011.111228 and while the documentation states it supports testing RFC 3428; I do not see specific test cases for the attributes above.
Does anyone know if there are test cases written for these MIB
instances?
Thanks in Advance
C:/Users/sambalam/AppData/Local/Temp/sctmp-5632-test_SNMP-SLSP-PE- 01-32.log
but when i tried to enter in the path "C:/Users/sambalam/", i dint see any folder named "AppData"
please help me see the collected logs...
Thanks in Advance..
-Regards
Answer: (by JimLogajan) On Windows 7, not all folders are made visible by default, which may explain your problem. A bit of web searching yielded the following web site which contains some information on how to change the folder options so that hidden folders will appear:
http://www.sevenforums.com/general-discussion/197219- missing-users-folder-explorer.html
Hopefully that will guide you?
Question: (by Syed) Hi all,
SNMP Request Commands Returns: 0 If the agent responded properly to the operation , 1 If the agent did not respond properly to the operation. How to confirm this action?
Will it be possible to print that value?
For ex:
snmptcl::snmpset mplsTunnelRowStatus.$mplsTunnelIndex 7 -context
$snmptcl(agent)
Here i am setting the invalid rowstatus value=7 , agent should return 1 due to error. I want that value to be printed? Is it possible?
Answer One: (by PumpkinJason) You would want to use the option 'rvbinds' as follows:
(SilverCreekMx) 19 % snmptcl::snmpset sysDescr.0 ""Asdad"" -rvbinds rv
1
(SilverCreekMx) 20 % puts $rv
{1.3.6.1.2.1.1.1.0 SNMPv2-TC:DisplayString Asdad}
if the set fails, you can also get the returned error status in '-restatus' option
(SilverCreekMx) 21 % snmptcl::snmpset sysDescr.0 "Asdad" -rvbinds rv -
restatus re
1
(SilverCreekMx) 22 % puts $re
notWritable
Answer Two: (by Syed) Here $rv is printing entire OBJECT ({1.3.6.1.2.1.1.1.0 SNMPv2-TC:DisplayString Asdad) but i need to catch "1" ?
please let me know if any other option is available?
Answer Three: (by PumpkinJason) couldn't you just do
set r [snmptcl::snmpset sysDescr.0 ""Asdad"" -rvbinds rv]
puts $r.
Question: (by Syed) My requirement is to get the below index value and need to save in the variable But when i did through SC GUI , it gave the below snippet.
snmptcl::snmpget -vbinds mplsTunnelIndexNextIndex.1 -rvbinds res -restatus estatus -expectstatus noError \ -expectvalue 2 -reindex eindex -octetstringformat 1 -comments comm\ -context $snmptcl(agent)
but when i try to edit the above script (shown below) and re-run it
failed. Also help me to execute in CONSOLE too...
#get
mplsTunnelIndexNextIndex.1
set mplsTunnelIndex [snmptcl::snmpget -vbinds mplsTunnelIndexNextIndex.1 \ -rvbinds res -restatus estatus -expectstatus noError \ -reindex eindex -octetstringformat 1 -comments comm\ -context $snmptcl(agent)] puts $mplsTunnelIndex
if { $comm != "" } { append results ""\nCOMMENTS: GET on mplsTunnelIndexNextIndex.1;
Expected value: $mplsTunnelIndex \n$comm" set type "failed" } else { append results "\n \nGET on mplsTunnelIndexNextIndex.1; Expected value: $mplsTunnelIndex \n " set type "passed"
} ::snmptools::scriptcmdtool::writeMessage $type $results set results
Answer One: (by Sandiyago) When you generate a command using SC GUI, the generated command always uses the default agent context "handle", i.e., the currently connected agent: $snmptcl(agent)
set mplsTunnelIndex [snmptcl::snmpget -vbinds mplsTunnelIndexNextIndex.1 \ -rvbinds res -restatus estatus -expectstatus noError \ -reindex eindex -octetstringformat 1 -comments comm\ -context $snmptcl(agent)] >puts $mplsTunnelIndex
This won't work. The returned value is only a status indicating whether the request succeeded or failed. It is not the value of the variable.
The value is contained in the variable 'res' given in the option ""-rvbinds res"". It is a list.
Try:puts $res
I read SC developer guide, it is often better to just write your own command. In this case I think you can simply do
snmptcl::snmpget mplsTunnelIndexNextIndex.1 value
-context $snmptcl(agent) puts $value
Answer Two: (by Syed) Thanks a lot. But still i have the below queries:
1. Similar to snmpget , please let me know how to perform "snmpset"
snmptcl::snmpset mplsTunnelRowstatus.1 5 -context $snmptcl(agent) puts $value
2. When i try to use the SC console , it is not showing for "snmpget", "snmpset".
Please let me know how the below command should be used in console.
Answer Three: (by Sandiyago)
1. snmptcl::snmpset mplsTunnelRowstatus.1 5 -context $snmptcl(agent)
That should work. It should set mplsTunnelRowstatus.1 to value 5. But in order to create a row, you usually need to set other columnar objects in the same 'set' operation.
2. didn't see the command you mentioned in your second query so can't help..
Answer Four: (by Syed) When i tried "snmptcl" or "snmpget" help in the SC console , i dint get any help commands related to it.
(SilverCreekMx) 46 % help snmpget This command is not supported by the help utility. Try "snmpget /?". SilverCreekMx) 47 % snmpget ? wrong # args: should be "snmpget test oidlist estat eind vbs args" (SilverCreekMx) 48 % snmpget /? wrong # args: should be "snmpget test oidlist estat eind vbs args" (SilverCreekMx) 49 % snmpget help wrong # args: should be "snmpget test oidlist estat eind vbs args"
How to see the usage of commands?"
Answer Five: (by Sandiyago) The command reference is in SilverCreek developer guide. I found it is very very useful since it has lots of examples.
Question: (by Sandiyago) Hi, I need to send SNMP get commands in one of our automated test scripts. Can anyone quickly tell me how can I do that?
We have been using Net-SNMP command line utilities but would like to use SilverCreek's Tcl command since our test scripts are all written in Tcl. It is ""painful"" to call SNMP shell commands in our Tcl scripts.
Thanks in advance!"
Answer One: (by PumpkinJason) The following simple commands show you how this can be done:
set ctx [snmptcl::context::create -address 192.168.1.1 \
-version SNMPv1 -rcomm public ]
snmptcl::snmpget sysDescr.0 value -context $ctx
puts $value
Hope this helps!
Answer Two: (by Syed)
1) Actually, what the below step will do?set ctx [snmptcl::context::create -address 192.168.1.1 \
-version SNMPv1 -rcomm public ]
2) My requirement is to get the below index value and need to save in the variable But when i did through SC GUI , it gave the below snippet.
snmptcl::snmpget -vbinds mplsTunnelIndexNextIndex.1 \
-rvbinds res -restatus estatus -expectstatus noError \
-expectvalue 2 -reindex eindex -octetstringformat 1 -comments comm\
-context $snmptcl(agent)
but when i try to edit the above script(shown below) and re-run it failed. Also help me to execute in CONSOLE too...
#get mplsTunnelIndexNextIndex.1
set mplsTunnelIndex [snmptcl::snmpget -vbinds mplsTunnelIndexNextIndex.1 \
-rvbinds res -restatus estatus -expectstatus noError \
-reindex eindex -octetstringformat 1 -comments comm\
-context $snmptcl(agent)]
puts $mplsTunnelIndexif { $comm != """" } {
append results "\nCOMMENTS: GET on mplsTunnelIndexNextIndex.1;
Expected value: $mplsTunnelIndex \n$comm"
set type "failed"
} else {
append results "\n \nGET on mplsTunnelIndexNextIndex.1; Expected value:
$mplsTunnelIndex \n "
set type "passed"
}::snmptools::scriptcmdtool::writeMessage $type $results
set results""
Answer Three: (by Sandiyago)
"set ctx [snmptcl::context::create -address 192.168.1.1 \
-version SNMPv1 -rcomm public ]
This creates an agent context "handle". The context handle
"encapsulate" agent IP address, community string etc.
Then later you can use the handle like
snmptcl::snmpget sysDescr.0 value -context $ctx
Answer Four: (by Sandiyago) When you generate a command using SC GUI, the generated command always uses the default agent context "handle", i.e., the currently connected agent: $snmptcl(agent)
Question: (by PumpkinJason) Hi All, I have a very "slow" agent--apparently it can't keep up with the test packets sent by SilverCreek. Can I slow down the speed at which the test packets are sent? Is this even possible? Thanks!
Answer One: (by Sandiyago) Yes you can do that. You Can Test->Fine-tune Testing Options: "Insert a delay between sending test packets...". We once had the same problem. But since our agent has been optimized so that is no longer an issue for us.
Hope this helps!
Answer Two: (by PumpkinJason) Thanks!
Question: (by Sandiyago) Hi, All my tests failed in checking sysUpTime value since our agent did not implement sysUpTime object. Well this makes it impossible to run any meaningful tests? Is there a way I can tell SilverCreek not to check sysUpTime while running tests? Thanks!
Answer One: (by illnifan) Select menu Tools->Options, click on "Test" Tab, and uncheck the check-box "Check System Reboot during each test ....". This should do what you want.
Answer Two: (by PumpkinJason) That worked for me! Thanks!
Answer Three: (by Maverick) Thanks for the solution, I was also struggling with this. It is very useful.
Question: (by Sandiyago) Hi All, I am new to SilverCreek. I noticed that, when I run tests, they always exit after a certain number of failures have been detected. How do I force a test not to exit until it finishes? I want to get all failures/errors report in a single test run. Thanks in advance!
Answer One: (by PumpkinJason) You need to configure Test->Fine-tune Testing Options: Number of Error allowed before applicable tests stop... The default is 10, set it to 0.
Question: (by Sandiyago) I feel this should be a simple question. But I am new to SilverCreek so... Can somebody quickly tell me how can I change the timeout settings? Thanks a lot!
Answer One: (by PumpkinJason) You can change timeout setting when you connect to your device. There is an optional option "timeout and retry settings". I think that is what you are looking for. Cheers
Answer Two: (by Sandiyago) yes. that's what I was looking for...Thanks!
Question: (by PumpkinJason) Hi all, Can anyone quickly tell me how to run a Tcl script from the DOS command line? I have batch_run_silvecreek_tests.tcl script from a colleague and I need to run it, so now how should I do it? Thanks in Advance.
Answer: (by illnifan) tclsh84.exe your_script.tcl
Hope this helps!
Question: (by PumpkinJason) Is there a simple a way for me to easily walk agent and again and again?
Answer One: (by illnifan) I know an easy (and recommended) way is to repeat running our prepackaged tests. For example, test1.1.2 walks the agent under test. To repeatedly walk the agent, you can use menu 'Test->repeat'.
From Tcl command line, you can also easily run tests using SilverCreek's Tcl command line interface. To simulate multiple managers, you may want to simultaneously starting multiple instances of those batch testing scripts in multiple Tcl interpreters.
Answer Two: (by PumpkinJason) Perfect!
Here at IWL we use Fedora Linux rather heavily.
Recently we noticed a problem with Fedora 16 that caused us a lot of trouble. So we though it might be a good idea to make a public note of what happened and how we solved it.
The system in question is Fedora 16. Generally we use the 64-bit versions, but we would not think that this issue is any different on 32-bit platforms.
We use NFS file servers, such as the Netgear ReadyNAS units.
When our systems boot up the /etc/fstab file contains several entries designating file systems to be automatically NFS mounted.
In addition we use the autofs (automounter) to mount user home directories when users log in. These directories are mounted under /home. However the full set of user directories under one of the mountpoints that was mounted via fstab, as mentioned above.
What started to happen recently is this: Our set of startup mounts was not being mounted, but the user login mounts via autofs were working. (We could however, manually mount the items in /etc/fstab by "mount -a -t nfs"). The system log file - /var/log/messages - was showing NFS timeout errors, which usually recovered after a while, and failures of the NFS lock daemon, lockd.
As side effects of this some applications such as Firefox, Thunderbird, and sometimes Google Chrome would fail to start (and for Firefox and Thunderbird leaving a .parentlock file in their respective hidden directory hierarchies that prevented subsequent launches.) Many other applications, both KDE and GNOME, did work, however. Our guess is that there was some dependency on NFS lock semantics of the particular programs.
This started happening quite recently - with Fedora 16 updates occurring sometime in the first 9 days of May, 2012.
We found a work-around, which is to create user home directories on the local hard drive (and modify our /etc/auto.home files so that those would show up as /home/username.)
That seemed to cure the NFS timeouts, although it still left the automatic mounts via /etc/fstab inoperative (but they could still be mounted manually.)
Firefox, Thunderbird, and Chrome all work smoothly again.
And we could reach our old home directories via NFS without encountering any NFS errors or timeouts.
In our search for solutions we noticed a mention that there are issues in the systemd (systemctl) system that may be bring up parts of the system too quickly so that some networking dependencies were not actually satisfied.
In any event we hope that this helps people who encounter this situation.
March 16, 2012
We recently added support for RADIUS to Mini Maxwell.
We first used the relatively well known mod_auth_radius module for the Apache web server.
However we hit a snag - mod_auth_radius can handle only one RADIUS server. It has no way to define a fallback RADIUS server that will be used if the primary one is non-responsive.
We found an alternative - mod_auth_xradius.
However, the current version, v.0.4.6 is fairly old and needs some patches to give it the ability to accommodate multiple RADIUS servers.
We found some useful material at http://www.howtoforge.com/apache_radius_two_factor_authentication. However the patch shown there had some white-space issues which caused the patch process to fail.
So below is a version of the patch that we use - it is essentially identical to the original patch but with clean white-space.
--- src/mod_auth_xradius.c.orig 2012-03-15 14:19:25.000000000 -0700
+++ src/mod_auth_xradius.c 2012-03-15 14:23:20.000000000 -0700
@@ -125,15 +125,15 @@
rctx = xrad_auth_open();
/* Loop through the array of RADIUS Servers, adding them to the rctx object */
- sr = (xrad_server_info *) dc->servers->elts;
for (i = 0; i < dc->servers->nelts; ++i) {
- rc = xrad_add_server(rctx, sr[i].hostname, sr[i].port, sr[i].secret,
+ sr = &(((xrad_server_info*)dc->servers->elts)[i]);
+ rc = xrad_add_server(rctx, sr->hostname, sr->port, sr->secret,
dc->timeout, dc->maxtries);
if (rc != 0) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"xradius: Failed to add server '%s:%d': (%d) %s",
- sr[i].hostname, sr[i].port, rc, xrad_strerror(rctx));
+ sr->hostname, sr->port, rc, xrad_strerror(rctx));
goto run_cleanup;
}
}
@@ -294,7 +294,7 @@
/* To properly use the Pools, this array is allocated from the here, instead of
inside the directory configuration creation function. */
if (dc->servers == NULL) {
- dc->servers = apr_array_make(parms->pool, 4, sizeof(xrad_server_info*));
+ dc->servers = apr_array_make(parms->pool, 4, sizeof(xrad_server_info));
}
sr = apr_array_push(dc->servers);
## This Loads mod_auth_xradius into Apache LoadModule auth_xradius_module /usr/lib/apache/mod_auth_xradius.so <IfModule mod_auth_xradius.c> # AuthXRadiusCache none - AuthXRadiusCache dbm "/var/cache/auth_xradius_cache" AuthXRadiusCacheTimeout 300 <Location /> # See http:http://www.outoforder.cc/projects/httpd/mod_auth_xradius/docs/ AuthName "RADIUS authentication for something or other" AuthType Basic AuthXRadiusAddServer "10.0.0.10:1812" "2secrets" AuthXRadiusAddServer "10.0.0.11:1812" "secret1" AuthXRadiusTimeout 5 AuthXRadiusRetries 3 AuthBasicProvider xradius Require valid-user </Location> </IfModule>
April 5, 2011
We have published a small Python program that may be used to drive a Mini Maxwell directly without the need for a user to operate the Mini Maxwell web pages.
This program is an alternative to the spreadsheet based facility that has been available to script Mini Maxwell.
The spreadsheet is constrained to a repeating sequence of a baseline plus up to twelve program steps.
This new program may be modified by the user to do any number of steps and be used inside a more sophisticated test sequencing harness provided by the user. The program exists as a shell command - so it fits nicely within any typical test language framework written using TCL, Perl, Python, etc.
It is expected that the user will make copies of this program and use those copies as templates for special-purposed versions such that each version imposes one set of impairment values into the Mini Maxwell.
(In addition, the user is expected to modify the program to inform the program whether the Mini Maxwell is Revision 12 or later.)
This program requires Python version 2.6 or later.
How to obtain: This program is available via the IWL support website. It may be found under the "Support" | "Customer Downloads" menu among the items available for "Mini Maxwell".
April 5, 2011
A new Maxwell plugin that can do user controlled re-sequencing of packets is available as part of the latest Maxwell TCP testing package.
The plugin is able to re-arrange packets in a flow so that, for example, packets that originate in sequence A, B, C, D, E, F will arrive in the order C, B, A, D, F, E.
The plugin allows user control of the re-sequence pattern and several other parameters.
Two scenarios have been created to allow the user to launch this plugin with a mouse click:
This plugin gives the user greater control over packet reordering than is possible using the standard jitter impairment.
Areas in which this plugin may prove useful:
The plugin works on the concept of a "group" of packets (where the group size is from 1 to 9 packets.)
For instance, the user can define a group size and specify the order in which the packets are released from the group. Thus with a group size of 4 containing packets A, B, C, and D the user could specify that they are released in order C, D, B, A.
There is another parameter to specify a number of packet between groups.
And another parameter to specify a limit on the time to accumulate the N packets of a group - if that limit is reached the group is drained, with a flag specifying whether to apply as much of the release pattern as usable, or not.
Note: re-sequencing causes packets to be delayed as they wait for the re-sequence group to be accumulated. Consequently, re-sequencing will override the effect of any delay or jitter added by the standard impairments on the flow being re-sequenced.