portGroup
portGroup - sets up a group of ports.
SYNOPSIS
portGroup sub-command options
DESCRIPTION
This command allows to set up an autonomous group of ports on which to perform an action or command, such as take ownership, start transmit, capture, or clearing statistics, to name a few. A port group must be created and the desired ports (or port) added to it to execute the selected action or command. When the port group is no longer needed, it should be destroyed.
STANDARD OPTIONS
lastTimeStamp
Read-only. 64-bit value. The relative time of transmit for all the ports in the port group.
COMMANDS
The portGroup command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
portGroup add groupID chasID cardID portID
Adds this port to a group with ID groupID. Specific errors are:
- No connection to a chassis
- The groupID port group does not exist
portGroup canUse groupID
Verifies whether all the ports in this group can be used by the current logged in user. Specific errors are:
- No connection to a chassis
- The groupID port group does not exist
portGroup cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the portGroup command.
portGroup clearScheduledTransmitTime groupID
Clears the scheduled transmit time associated with a group of ports. See setScheduledTransmitTime. Specific errors are:
- No connection to a chassis
- The groupID port group does not exist
portGroup config option value
Modify the configuration options of all the ports. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for portGroup. (There are currently no configurable options for portGroup and therefore no use for this command).
portGroup create groupID
Creates a port group and assigns it the ID groupID. Specific errors are:
- The groupID port group already exists
portGroup del groupID chasID cardID portID
Deletes this port from the group with ID groupID. Specific errors are:
- No connection to a chassis
- The groupID port group does not exist
portGroup destroy groupID
Destroys the port group with ID groupID. Specific errors are:
- The groupID port group does not exist
portGroup setCommand groupID cmd
Performs the action or command cmd specified on all ports in the group with ID groupID. Note that some of the command values previously listed in this table have been moved to the IxRouter Tcl Development Guide. cmd may be one of the following:
Option |
Value |
Usage |
---|---|---|
startTransmit |
7 |
start transmission simultaneously |
stopTransmit |
8 |
stop transmission simultaneously |
startCapture |
9 |
start capturing packets that meet the specified filter criteria |
stopCapture |
10 |
stop capturing simultaneously |
resetStatistics |
13 |
clear all statistic counters |
pauseTransmit |
15 |
pause transmission |
stepTransmit |
16 |
single step the transmit one packet at a time |
transmitPing |
17 |
transmit a ping on all of the ports in the port group |
asr5Transmit |
18 |
not yet implemented |
clearTimeStamp |
19 |
clear all time stamps to synchronize the time stamps throughout the chassis chain. |
restartAutoNegotiate |
22 |
restarts autonegotiation |
downloadFPGA |
27 |
downloads a new FPGA to the ports in the port group |
collisionStart |
28 |
start collision generation |
collisionStop |
29 |
stop collision generation |
transmitArpRequest |
30 |
sends ARP requests as configured in ipAddressTable commands. |
startLatency |
31 |
starts real-time latency analysis and collects minimum, maximum and average latency values for every incoming frame in a packet group. Ensure to clear timestamps on all send and receive ports before starting latency measurements. |
stopLatency |
32 |
stops real-time latency analysis |
clearLatency |
33 |
clears all real-time latency values |
takeOwnership |
40 |
if available, take ownership of these ports |
takeOwnershipForced |
41 |
forcefully take ownership of these ports overriding the current owner's rights |
clearOwnership |
42 |
clear ownership of owned ports |
clearOwnershipForced |
43 |
forcefully clear ownership of ports overriding the current owner's rights |
clearArpTable |
48 |
clear ports' arp tables |
staggeredStartTransmit |
51 |
start transmit in sequence |
resetSequenceIndex |
62 |
resets the sequence number used in sequence number checking operations for all ports in the portGroup |
rebootLocalCPU |
84 |
causes the CPU to reboot, if the port uses a CPU |
clearPerStreamTxStats |
120 |
clears the per stream statistics |
loadPoEPulse |
121 |
for PoE load modules, causes a power pulse |
armPoeTrigger |
123 |
arm the triggers for poeSignalAcquisition |
abortPoeArm |
124 |
abort the triggers for poeSignalAcquisition |
startAtmOamTx |
125 |
starts transmission of the ATM OAM messages |
stopAtmOamTx |
126 |
stops transmission of the ATM OAM messages |
simulatePhysicalInter |
128 |
sets the port to simulate a downed interface |
simulatePhysical |
129 |
reenables the interface after setting the port to simulate a downed interface. |
clearPrbsCapture |
139 |
Clears the PRBS capture buffer |
startTxRxSyncStats |
146 |
Starts collecting Tx/Rx Sync stats |
stopTxRxSyncStats |
147 |
Stops collecting Tx/Rx Sync stats |
clearThresholdTime |
154 |
Clears the threshold timestamps associated with a group of ports. |
clearPcsLaneStats |
155 |
Clears PCS Lane stats |
Specific errors are:
- No connection to a chassis
- One or more ports in the port group are being used by another user
- One or more ports in the port group are invalid
- Network error between the client and chassis
portGroup setDefault
Sets to IxTclHal default values for all configuration options.
portGroup setScheduledTransmitTime groupID time
This feature only applies to ports which support the portFeatureScheduledTxDuration feature (see port isValidFeature). This sub-command sets the transmit time duration associated with the group of ports. time is expressed in seconds. When a scheduled transmit time is set, and a portGroup setCommand <group> startTransmit is issued, the ports in the port group transmits until their streams are exhausted or the specified time has elapsed, whichever comes first. This value may be cleared with the clearScheduledTransmitTime sub-command to this command. Specific errors are:
- No connection to a chassis
- The groupID port group does not exist
- Invalid time value.
portGroup startPrbsCapture portlist
Starts PRBS capture on specified ports. This command also starts packetGroup stat collection.
portGroup stopPrbsCapture portlist
Stops PRBS capture on specified ports. This command also stops packetGroup stat collection
portGroup write groupID [writeProtocolServer]
Commits port properties information such as speed, duplex mode, and autonegotiation in hardware. If writeProtocolServer is true, then the protocol server is stopped and all applicable objects written to it. Otherwise, the protocol server is not affected. Specific errors are:
- No connection to a chassis
- The port group specified by groupID hasn't been created
- One or more ports in the port group are being used by another user
- Network error between the client and chassis
portGroup writeConfig groupID [writeProtocolServer]
Configures streams, filter and capture parameters of all ports in the group except the port properties such as speed, duplex mode, and autonegotiation. If writeProtocolServer is true, then the protocol server is stopped and all applicable objects written to it. Otherwise, the protocol server is not affected. Specific errors are:
- No connection to a chassis
- The port group specified by groupID hasn't been created
- One or more ports in the port group are being used by another user
- Network error between the client and chassis
DEPRECATED
COMMANDS
portGroup get groupID objectID
Gets the type of object designated by objectID for a list of ports. The only defined value for objectID is usbConfig (0), which must be applied to USB configured ports. Specific errors are:
- Invalid objectID
- The groupID port group does not exist
EXAMPLES
package require IxTclHal
# Connect to chassis and get chassis ID
set host galaxy
set username user
# Check if we're running on UNIX - connect to the TCL Server
# which must be running on the chassis
if [isUNIX] {
if [ixConnectToTclServer $host] {
ixPuts "Could not connect to $host"
return 1
}
}
# Now connect to the chassis
if [ixConnectToChassis $host] {
ixPuts $::ixErrorInfo
return 1
}
# Get the chassis ID to use in port lists
set chas [ixGetChassisID $host]
# Assume that there's a four port 10/100 TX card in this slot
# with port 1 looped to port 2 and 3 to 4
set card 1
set portList [list [list $chas $card 1] \
[list $chas $card 2] \
[list $chas $card 3] \
[list $chas $card 4]]
# Login before taking ownership
if [ixLogin $username] {
ixPuts $::ixErrorInfo
return 1
}
# Take ownership of the ports we'll use
if [ixTakeOwnership $portList] {
ixPuts $::ixErrorInfo
return 1
}
# Port group to be used
set group 1234
set txGroup 13
set rxGroup 24
portGroup create $group
portGroup add $group $chas $card 1
portGroup add $group $chas $card 2
portGroup add $group $chas $card 3
portGroup add $group $chas $card 4
portGroup create $txGroup
portGroup add $txGroup $chas $card 1
portGroup add $txGroup $chas $card 3
portGroup create $rxGroup
portGroup add $rxGroup $chas $card 2
portGroup add $rxGroup $chas $card 4
if {[portGroup canUse $group] != 0} {
ixPuts "Can't use card $card ports 1-4"
break
}
portGroup setCommand $group takeOwnership
# ... insert port setup here. This example assumes the defaults
portGroup write $group
portGroup setCommand $rxGroup resetStatistics
portGroup setCommand $rxGroup startCapture
portGroup setCommand $txGroup startTransmit
after 5000
portGroup setCommand $txGroup stopTransmit
portGroup setCommand $rxGroup stopCapture
portGroup setCommand $group clearOwnership
portGroup destroy $group
portGroup destroy $rxGroup
portGroup destroy $txGroup
# Let go of the ports that we reserved
ixClearOwnership $portList
# Disconnect from the chassis we're using
ixDisconnectFromChassis $host
# If we're running on UNIX, disconnect from the TCL Server
if [isUNIX] {
ixDisconnectTclServer $host
}