tcpRoundTripFlow

tcpRoundTripFlow - configure the tcp round trip flow parameters for a port on a card on a chassis

SYNOPSIS

tcpRoundTripFlow sub-command options

DESCRIPTION

The tcpRoundTripFlow command is used to configure the tcp round trip flow specific information used when setting the tcp round trip flow on a port.

STANDARD OPTIONS
dataPattern type

Sets up the default data pattern to be inserted into the streams on the port. type may be one of the following values:

Option

Value

Usage

allOnes

0

the frame contains all 1's

allZeroes

1

the frame contains all 0's

xAAAA

2

the frame contains all A's

x5555

3

the frame contains all 5's

x7777

4

the frame contains all 7's

xDDDD

5

the frame contains all D's

xF0F0

6

the frame contains repeating pattern of F0F0's

x0F0F

7

the frame contains repeating pattern of 0F0F's

xFF00FF00

8

the frame contains repeating pattern of FF00FF00's

x00FF00FF

9

the frame contains repeating pattern of 00FF00FF's

xFFFF0000

10

the frame contains repeating pattern of FFFF0000's

x0000FFFF

11

the frame contains repeating pattern of 00000FFFF's

x00010203

12

(default) the frame contains repeating pattern of 00010203's

x00010002

13

the frame contains repeating pattern of 00010002's

xFFFEFDFC

14

the frame contains repeating pattern of FFFEFDFC's

xFFFFFFFE

15

the frame contains repeating pattern of FFFFFFFE's

userpattern

16

select this type to insert user-defined data pattern in the frame, as defined in pattern

forceIpSA true/false

Forces the IP source address in reflected packets, as defined in the ipSA option. (default = false)

framesize

Number of bytes in each frame in the tcp round trip flow. (default = 64)

gatewayIpAddr

Gateway IP address. (default = 0.0.0.0)

ipSA

IP source address. (default = 0.0.0.0)

macDA

MAC destination address. (default={00 00 00 00 00 00})

macSA

MAC source address. (default={00 00 00 00 00 00})

pattern

Specify a user-defined pattern of data to be transmitted on this stream. The dataPattern option must be set to type userpattern or this pattern is ignored (default= {00 01 02 03})

patternType type

Type of given patterns that is inserted in all the frames transmitted on the tcp round trip flow stream. type can be one of the following:

Option

Value

Usage

incrByte

0

increment each byte of the frame during transmission (default)

incrWord

1

increment each word of the frame during transmission

decrByte

2

decrement each byte of the frame during transmission

decrWord

3

decrement each word of the frame during

patternTypeRandom

4

generate random pattern of data during transmission

repeat

5

transmit the same pattern of data in the frame transmission

nonRepeat

6

transmit a fixed pattern of data. Note: Fixed type in IxExplorer.

useArpTable true/false

Enable ARP Mac destination address option. (default = false)

COMMANDS

The tcpRoundTripFlow command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.

tcpRoundTripFlow cget option

Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tcpRoundTripFlow command.

tcpRoundTripFlow config option value

Modify the tcp round trip flow configuration options of the port. If no option is specified, returns a list describing all of the available the tcpRoundTripFlow options (see STANDARD OPTIONS) for port.

tcpRoundTripFlow get chasID cardID portID

Gets the current tcp round trip flow configuration of the port with id portID on card cardID, chassis chasID. Call this command before calling tcpRoundTripFlow cget option to get the value of the configuration option.

tcpRoundTripFlow set chasID cardID portID

Sets the tcp round trip flow configuration of the port with id portID on card cardID, chassis chasID by reading the configuration option values set by the tcpRoundTripFlow config option value command.

tcpRoundTripFlow setDefault

Sets to IxTclHal default values for all configuration options.

tcpRoundTripFlow setFactoryDefaults chasID cardID portID

Sets the factory defaults to the tcpRoundTripFlow.

EXAMPLES

package require IxTclHal

# In this example, two ports on a 10/100 card are connected through a

# simple switch. The first port transmits at 100Mb/s and the second

# port transmits at 10Mb/s.

#

# The second port uses TCP Round Trip Flows to reflect the received

# packets back to port 1, where they are captured and analyzed for

# latency using captureBuffer.

# 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]

# Assumes that card 1 is a 10/100 card with both ports connected to

# a simple L2 switch

set card 1

set txPort 1

set rxPort 2

# Useful port lists

set portList [list [list $chas $card $txPort] [list $chas $card $rxPort]]

set txPortList [list [list $chas $card $txPort]]

set rxPortList [list [list $chas $card $rxPort]]

# 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

}

# Test parameters

# MAC addresses

set p1MAC [list 00 00 00 01 01 01]

set p2MAC [list 00 00 00 01 01 02]

# IP addresses

set p1IP "192.168.18.1"

set p2IP "192.168.18.2"

# Number of frames to transmit

set numFrames 10

# Set up Transmit Port

# Port 1: 100Mb/s

port setFactoryDefaults $chas $card $txPort

port config -speed 100

port config -advertise100FullDuplex true

port config -advertise100HalfDuplex false

port config -advertise10FullDuplex false

port config -advertise10HalfDuplex false

# Stream: 1 stream @ 100%, frame size 100, specific number of frames

# Make sure to insert time stamps (fir)

stream setDefault

stream config -enable true

stream config -dma stopStream

stream config -numBursts 1

stream config -numFrames $numFrames

stream config -rateMode usePercentRate

stream config -percentPacketRate 100

stream config -sa $p1MAC

stream config -a $p2MAC

stream config -framesize 100

stream config -fir true

# IP: ethernetII tcp packets from port to port

ip setDefault

ip config -ipProtocol tcp

ip config -sourceIpAddr $p1IP

ip config -sourceIpAddrRepeatCount 1

ip config -sourceIpAddrMode fixed

ip config -destIpAddr $p2IP

ip config -destIpAddrRepeatCount 1

ip config -destIpAddrMode fixed

ip set $chas $card $txPort

tcp setDefault

tcp set $chas $card $txPort

protocol setDefault

protocol config -name ipV4

protocol config -ethernetType ethernetII

# Set the stream and ports

stream set $chas $card $txPort 1

port set $chas $card $txPort

# Set up Receive Port

# Port 2: 10Mb/s, TCP round trip mode reflects 64 byte packets

port setFactoryDefaults $chas $card $rxPort

port setDefault

port config -speed 10

port config -advertise100FullDuplex false

port config -advertise100HalfDuplex false

port config -advertise10FullDuplex true

port config -advertise10HalfDuplex false

port config -transmitMode portTxPacketFlows

port config -receiveMode portRxTcpRoundTrip

# Set up TCP RT for Mac addresses

tcpRoundTripFlow setDefault

tcpRoundTripFlow config -macSA $p2MAC

tcpRoundTripFlow config -macDA $p1MAC

tcpRoundTripFlow set $chas $card $rxPort

# Set the port

port set $chas $card $rxPort

ixWritePortsToHardware portList

# Wait for changes to take affect

after 1000

ixCheckLinkState portList

# Send the packets and wait for things to be done

ixClearStats txPortList

ixStartCapture txPortList

ixStartTransmit txPortList

after 1000

ixCheckTransmitDone txPortList

# Fill the capture buffer with all of the packets

capture get $chas $card $txPort

set numRxFrames [capture cget -nPackets]

if {$numRxFrames != $numFrames} {

ixPuts "$numFrames transmitted, but $numRxFrames received"

}

captureBuffer get $chas $card $txPort 1 [expr $numRxFrames - 1]

# Figure out the latency and print it out

captureBuffer getStatistics

captureBuffer getConstraint 1

ixPuts -nonewline "Avg Latency is "

ixPuts -nonewline [captureBuffer cget -averageLatency]

ixPuts -nonewline "ns, min = "

ixPuts -nonewline [captureBuffer cget -minLatency]

ixPuts -nonewline "ns, max = "

ixPuts -nonewline [captureBuffer cget -maxLatency]

ixPuts "ns"

# 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

}

SEE ALSO

stream, ip, tcp