Initialization, Setup and Cleanup

The commands in this section relate to overhead operations necessary to prepare for data transmission, capture and statistical analysis. The commands covered in this section are the following:

Mapping and Port Lists

Four types of traffic mappings are common in TCL tests, as shown in Figure: Traffic Mappings.

  1. One-to-one mapping: One transmit port is mapped to one receive port. For example, port 1 of the Ixia chassis transmits to port 1 of the DUT, which forwards traffic back on its port 2 to Ixia chassis port 2.
  2. One-to-many mapping: One transmit port is mapped to multiple receive ports. For example, port 1 of the Ixia chassis transmits to port 1 of the DUT, which forwards back on its ports 2, 3, and 4 to Ixia chassis ports 2, 3, and 4.
  3. Many-to-one mapping: Multiple transmit ports mapped to a single receive port. For example, ports 1, 2, and 3 of Ixia chassis transmit to ports 1, 2, and 3 of the DUT, which forwards back on its port 4 to Ixia chassis port 4.
  4. Many-to-many mapping: Multiple transmit ports are mapped to multiple receive ports. For example, port 1 of the Ixia chassis transmits to port 1 of the DUT, which forwards back on its ports 2, 3, and 4 to Ixia chassis ports 2, 3, and 4; at the same time, port 2 of the Ixia chassis transmits to port 2 of the DUT which forwards back on its ports 1, 3, 4 to Ixia chassis ports 1, 3, and 4; and so on. In this mapping, all ports transmit to and receive from all other ports in the system.

The traffic mapping is a logical collection of ports and configurations stored in memory. It simplifies the identification of transmit and receive ports during the configuration of streams and filters.

Figure: Traffic Mappings



Tcl programmers find it convenient to configure their ports using the map utility command in one of the following four global arrays:

map

The map command is used to define any of the four basic array types. Refer to “map” for full details. The important options and sub-commands of this command are:

Table:map Options

Member Usage

type

The type of mapping; one of one2one, one2many, many2one or many2many.

Member Usage

add

Adds a new transmit port - receive port pair to the mapping.

del

Deletes a transmit port - receive port pair from the mapping.

new

Clears the current map and creates a new map as described in type, above.

show

Shows the current map configuration.

Any of the four global arrays may be used in most of the high-level commands where a portList is called for as mentioned in the following list:

The command uses the part of the array appropriate to the command; for example, ixStartTransmit uses only the transmit ports of the array. Alternatively, any command that calls for a portList may construct an array of ports and use it as an argument. Two alternative forms are defined in the following list:

ixCreatePortListWildCard

Port lists may of course be created by hand. For example:

{{1 1 1} {1 1 2} {1 1 3} {1 1 4}}

The ixCreatePortListWildCard command can be used to build a sorted list containing wild card characters (*) to indicate all cards and/or all ports. For example,

ixCreatePortListWildCard {{1 * *}} - all cards and all ports on chassis 1

ixCreatePortListWildCard {{1 1 *} {1 2 1} {1 2 2}} - all ports on card 1 and ports 1 and 2 on card 2.

A wild card cannot be used for chassis ID. Also, if a combination of a list element containing wild cards and port numbers are used, then the port list passed must be in a sorted order. The format of this command is as follows:

ixCreatePortListWildCardOptions portList [excludePortList]

where portList is the list of ports (with wildcards) to be included, and excludePortList is a list of ports, which may not contain wildcards, which should be omitted from the returned list.

Refer to “ixCreatePortListWildCard” for full details of this command.

ixCreateSortedPortList

The ixCreateSortedPortList command can be used to construct a port list for a range of ports–from a port on a single card to another port on a different card. For example:

ixCreateSortedPortList {1 1 1} {1 5 4} {{1 3 2}}- all ports between chassis 1 card 1 port 1 and port 4 on card 5, excluding card 3 port 2.

The format of this command is as follows:

ixCreateSortedPortList portFrom portTo exclude

where portFrom is the first port in the range and portTo is the last port in the range. These are individual port specifications–not a list of lists as in other commands. exclude is a list of lists indicating individual ports to be omitted from the list; an empty list is expressed as {{}}.

Refer to “ixCreateSortedPortList” for full details of this command.

getAllPorts, getRxPorts and getTxPorts

These three utility command all serve to retrieve the ports associated with a map array. The three commands are the following:

Including Source Code

ixSource

The ixSource command is very useful in sourcing large number of .tcl files from a folder or a number of individual files. It may be called with either a single folder name or a set of full path names. In the former case, all the .tcl files within the folder are sourced and in the latter case, each of the individual files are sourced. The format of this command is as follows:

ixSource {fileNames | directoryName}

where fileNames is any number of files to be sourced and directoryName is the folder name where all the files under that folder are going to be sourced.

Refer to “ixSource” for full details on this command.

Chassis and TclServer Connection

Several commands are available to initialize connection to the chassis chain to be used for testing. Provisions are included to connect to TclServer from Unix platforms.

When connecting to a TCL Server or IxServer specifically on a Native IxOS Chassis, IPv6 address can be provided as follows: ixConnectToChassis aa:bb:cc::d

ixConnectToTclServer / ixDisconnectTclServer

It can be used from a Unix client to connect to a host that runs the TclServer, or disconnect from the server. The format of this command is as follows:

ixConnectToTclServer serverName

ixDisconnectTclServer

where serverName is the hostname or IP address of the Windows based machine hosting the IxTclServer.

Refer to “ixConnectToTclServer”and “ixDisconnectTclServer” for a full description of this command.

ixProxyConnect

The ixProxyConnect command combines the functions of ixTclSrvConnect and IxConnectToChassis. The format of this command is as follows:

ixProxyConnect chassisName chassisList [cableLen [logfilename]]

where chassisName is the hostname or IP address of a host running TclServer which is used from Unix clients, chassisList is a list of all of the chassis in the chain - either IP addresses or host names that can be resolved through DNS, cableLen is the length of cables that connects the chassis, and logfilename is the file to create to store log messages.

Refer to “ixProxyConnect” for a full description of this command.

ixConnectToChassis / ixDisconnectFromChassis

The ixConnectToChassis command is called from IxConnectToChassis. It connects to a list of chassis given the host names or IP addresses. The format of these commands are as follows:

ixConnectToChassis chassisList [cableLen]

ixDisconnectFromChassis

where chassisList is a list of all of the chassis in the chain - either IP addresses or host names that can be resolved through DNS and cableLen is the length of cables that connects the chassis.

Refer to “ixConnectToChassis” and “ixDisconnectFromChassis” for a full description of these commands.

Connect to a Ixia Chassis from a Linux Client

The ixConnectToChassis command is used to connect to a Virtual Chassis from a Linux machine, as shown in the following sample script. Before connecting to the IxVM Linux Chassis, do the following:

You can run the tclsh command by setting up the environment. For detailed info see UNIX Environment.

ixGetChassisID

This command obtains the chassis ID of a chassis given its hostname or IP address. This command is needed after using ixConnectToChassis or ixProxyConnect to obtain automatically assigned chassis IDs. The format of the command is:

ixGetChassisID chassisName

where chassisName is the hostname or IP address of the chassis. Refer to “ixGetChassisID” for a full description of this command.

user

This command has no effect on test operation. Rather it provides a means of storing global information about the user and the DUT. The only sub-commands available are config and cget. The important options of this command are mentioned in the following table:

Table:user Options

Member Usage

productname

Name of the DUT being tested.

version

Version number of the product.

serial#

Serial number of the product.

username

The name of the user running the tests.

Refer to “user” for a full description of this command.

General Purpose Commands

The following two commands are invaluable tools for committing large amounts of configuration information to the hardware.

ixWriteConfigToHardware

This command commits the configuration of streams, filters, and protocol information on a group of ports to hardware. The format of the command is as follows:

ixWriteConfigToHardware portList

where portList is a list of ports to apply the command to. Refer to “ixWriteConfigToHardware” for full description of this command.

ixWritePortsToHardware

In addition to performing all of the functions of IxWriteConfigToHardware, this command commits the configuration of ports such as MII properties on 10/100 interface (speed, duplex modes, auto-negotiation), port properties on Gigabit interfaces, and PPP parameters on Packet over SONET interfaces on a group of ports to hardware. Link may drop as a result of this command’s execution. The format of the command is as follows:

ixWritePortsToHardware portList

where portList is a list of ports to apply the command to. Refer to “ixWritePortsToHardware” for full description of this command.

cleanUp

cleanUp

The cleanUp command may be used to reset the Ixia hardware and to undo the effects of the package require IxTclHal command. The state of the wish shell is reset back to its initial state with respect to Ixia software execution. Refer to “cleanUp” for full description of this command.