srpArp

srpArp - configure an SRP ARP packet

SYNOPSIS

srpArp sub-command options

DESCRIPTION

The srpArp command is used to configure the contents of an SRP ARP packet to be transmitted as part of a stream.

 STANDARD OPTIONS
mode

Indicates the mode of the packet.

Option

Value

Usage

srpModeReserved000

0

 

srpModeReserved001

1

 

srpModeReserved010

2

 

srpModeATMCell

3

An ATM data cell.

srpModeControlMessage1

4

A control message to be passed to the destination host.

srpModeControlMessage2

5

A control message to be buffered for the destination host.

srpModeUsageMessage

 

(default) An SRP usage message.

srpModePacketData

7

An SRP data packet.

parityBit

The parity over the other SRP header bits.

Option

Value

Usage

srpParityBitEven

0

Insert an even parity bit.

srpParityBitOdd

1

(default) Insert a correct, odd parity.

priority

Indicates the priority of the SRP packet. Eight priority levels (0 through 7) are offered. Packets on the ring are treated as low or high priority, where a threshold variable determines which values fall into the high priority range. This value is usually copied from the IP precedence bits. Control packets always use priority 7. (default = 0)

ringIdentifier

Indicates whether the inner or outer ring is to receive the packet. Used by the Arp to make decisions about ring wrap or to determine whether or not a packet is accepted on the ring.

Option

Value

Usage

srpRIngIdentifierOuter

0

(default) Outer ring.

srpRIngIdentifierInner

1

Inner ring.

ttl

The hop counter decremented each time a node forwards a packet. When the counter reaches 0, the packet is removed from the ring. This may be set from 0 through 255. (default = 1)

COMMANDS

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

srpArp cget option

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

srpArp config option value

Modify the configuration options of the srpArp. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for srpArp.

srpArp decode capSlice chasID cardID portID

Decodes a captured slice/frame into the srpArp variables. If not an srpArp frame, returns TCL_ERROR. May be used to determine if the captured frame is a valid srpArp frame. Specific errors are:

srpArp get chasID cardID portID

Gets the current configuration of the srpArp frame for port with id portID on card cardID, chassis chasID. from its hardware. Call this command before calling srpArp cget option value to get the value of the configuration option. Specific errors are:

srpArp set chasID cardID portID

Sets the configuration of the srpArp in IxHAL for port with id portID on card cardID, chassis chasID by reading the configuration option values set by the srpArp config option value command. Specific errors are:

srpArp setDefault

Sets to IxTclHal default values for all configuration options.

EXAMPLES

package require IxTclHal

# Connect to chassis and get chassis ID

set host localhost

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]

set card 71

set port 1

set portList [list [list $chas $card $port]]

# 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

}

sonet get $chas $card $port

sonet config -header sonetSrp

sonet set $chas $card $port

sonet write $chas $card $port

#

# IPS

srpIps setDefault

# Set Srp Header

srpIps config -ttl 128

srpIps config -priority 2

srpIps config -mode srpModeControlMessage1

srpIps config -ringIdentifier srpRingIdentifierInner

srpIps config -parityBit srpParityBitOdd

# Set Control Header

srpIps config -controlVersion 0

srpIps config -controlTTL 128

# Set IPS Specific Parameters

srpIps config -originatorMacAddress [stream cget -sa]

srpIps config -requestType srpIpsRequestTypeWaitToRestore

srpIps config -pathIndicator srpIpsPathIndicatorShort

srpIps config -statusCode srpIpsStatusCodeIdle

protocol setDefault

protocol config -appName SrpIps

srpIps set $chas $card $port

stream set $chas $card $port 1

#

# Discovery

#

srpDiscovery setDefault

# Set Srp Header

srpDiscovery config -ttl 128

srpDiscovery config -priority 2

srpDiscovery config -mode srpModeControlMessage1

srpDiscovery config -ringIdentifier srpRingIdentifierInner

srpDiscovery config -parityBit srpParityBitOdd

# Set Control Header

srpDiscovery config -controlVersion 0

srpDiscovery config -controlTTL 128

# Set Discovery Specific Parameters

srpDiscovery config -originatorMacAddress [stream cget -sa]

srpDiscovery config -topologyLength 25

# Set MAC bindings

srpDiscovery clearAllMacBindings

srpMacBinding config -address {00 00 de b0 01 00}

srpMacBinding config -wrappedNode srpWrappedNode

srpMacBinding config -ringIdentifier srpRingIdentifierInner

srpDiscovery addMacBinding

srpMacBinding config -address {00 00 de b0 01 01}

srpMacBinding config -wrappedNode srpWrappedNode

srpMacBinding config -ringIdentifier srpRingIdentifierInner

srpDiscovery addMacBinding

srpDiscovery set $chas $card $port

protocol setDefault

protocol config -appName SrpDiscovery

stream set $chas $card $port 2

#

# ARP

#

srpArp setDefault

# Set Srp Header

srpArp config -ttl 255

srpArp config -priority 7

srpArp config -mode srpModePacketData

srpArp config -ringIdentifier srpRingIdentifierOuter

srpArp config -parityBit srpParityBitEven

srpArp set $chas $card $port

protocol setDefault

protocol config -appName srpArp

stream set $chas $card $port 3

#

# Usage

#

port get $chas $card $port

srpUsage setDefault

# Set Srp Header

srpUsage setDefault

srpUsage config -ttl 128

srpUsage config -priority 2

srpUsage config -mode srpModeUsageMessage

srpUsage config -ringIdentifier srpRingIdentifierInner

srpUsage config -parityBit srpParityBitOdd

srpUsage config -txMacAddress [port cget -MacAddress]

srpUsage config -txUsageEnable true

srpUsage config -txRepeatInterval 100

srpUsage config -txValue 0

srpUsage config -rxMacAddress [port cget -DestMacAddress]

srpUsage config -rxTimeout 100

srpUsage config -rxTimeoutThreshhold 10

srpUsage set $chas $card $port

port set $chas $card $port

port write $chas $card $port

# Post transmission.

stat get statAllStats $chas $card $port

stat cget -srpKeepAliveFramesReceived

stat getRate $chas $card $port -srpSrpHeaderParityErrors

# 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

srpDiscovery, srpMacBinding, srpIps, srpUsage