rprFairness

rprFairness - set up transmission of RPR fairness packets

SYNOPSIS

rprFairness sub-command options

DESCRIPTION

The rprFairness command is used to set up the content of RPR Fairness messages sent periodically from a node. The RPR Fairness Algorithm (FA) is used to manage congestion on the ringlets in an RPR network. Fairness frames are sent periodically to advertise bandwidth usage parameters to other nodes in the network to maintain weighted fair share distribution of bandwidth. The messages are sent in the direction opposite to the data flow; that is, on the other ringlet.

The Sonet header must be set to sonetRpr using sonet config -header sonetRpr before this command can be used.

STANDARD OPTIONS

RPR Fairness Options

controlValue

The 16-bit normalized advertised fair rate. A full rate is indicated by all 1's (0xFFFF). (default = 0)

enableTransmit
true | false

If true, the transmission of RPR Fairness Control Messages (FCMs) is enabled. They are sent at the repeat interval specified in repeatInterval until this option is set to false. (default = false)

messageType

The type of RPR fairness control message (FCM) used for congestion control.

Option

Value

Usage

rprSingleChoke

0

(default) Single choke: sent once per advertisement interval. Contains information on the congestion level for the ringlet.

rprMultiChoke

1

Multi choke: sent once every 10 advertisement intervals.

repeatInterval

The time interval, expressed in microseconds, between transmissions of Fairness frames. The range is from 10 to 65,000 microseconds. (default = 90)

rxAgingInterval

The keepalive timeout value, expressed in microseconds, indicating the amount of time that may elapse without an RPR message being received before considering the link down. (default = 100)

rxMacAddress

The 6-byte MAC address from which the packet was sent. (default = {00 00 00 00 00 00})

txMacAddress

The 6-byte MAC Source address for the transmitting node. (default = {00 00 00 00 00 00})

RPR Ring Control Options

enableFairnessEligible
true | false

This 1-bit field indicates the eligibility of this packet for the fairness algorithm. Note that packets with serviceClass set to rprServiceClassA0 or rprServiceClassA1 are not eligible for fairness control. (default = true)

enableOddParity
true | false

If true, then the value of the transmitted parity is odd over the first two bytes (TTL and baseRingControl). If false, even parity is set. (default = true)

enableWrapEligible
true | false

This 1-bit field indicates whether the packet is wrap eligible.(default = false)

packetType

This 2-bit field indicates the type of the RPR packet.

Option

Value

Usage

rprIdlePacket

0

Idle frame.

rprControlPacket

1

Control frame, expect for Fairness frames.

rprRingControlPacket

2

(default) Fairness frame.

rprDataPacket

3

Data frame.

parityBit

Read only. The value of the parity associated with the ring control header. For use in RPR Fairness Frames only. The value of this field is influenced by the value of the enableOddParity field.

ringIdentifier

This 1-bit field is the Ringlet Identifier (RI), indicating the ringlet from which the RPR frame was first transmitted.

Option

Value

Usage

rprRinglet0

0

(default) Ringlet 0.

rprRinglet1

1

Ringlet 1.

serviceClass

This 2-bit field indicates the MAC service class for the frame.

Option

Value

Usage

rprServiceClassC

0

(default) Class C is the lowest level of traffic, transmitted on a best-efforts basis. None of the traffic has a guaranteed data rate, and no limits are placed on delay and jitter. ClassC traffic is eligible for use by the fairness algorithm.

rprServiceClassB

1

Class B is the next higher service level, with an allocated and guaranteed data rate for a portion of the traffic, plus low delay and jitter (CIR). The additional traffic is transmitted with no guaranteed data rate (EIR) and is eligible for use by the fairness algorithm.

rprServiceClassA1

2

Class A is the highest service level, providing an allocated and guaranteed data rate, plus low delay and jitter (CIR). It is not eligible for use by the fairness algorithm.

There are two sub-classes, which are not distinguished to the MAC client: Class A1 and Class A0.

Class A1 reserved bandwidth may be used by ClassB or ClassC traffic if not in current use.

rprServiceClassA0

3

 

ttl

This 8-bit field indicates the Time to Live option of the RPR header. The TTL value is the first octet of an RPR frame header. This indicates the maximum number of hops to the destination. (default = 1)

COMMANDS

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

rprFairness cget option

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

rprFairness config option value

Modify the configuration options of the port. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for port. If option is specified with no value, then the commands returns a list of values available for this option.

rprFairness get chasID cardID portID

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

rprFairness set chasID cardID portID

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

rprFairness setDefault

Sets to IxTclHal default values for all configuration options.

EXAMPLES

package req IxTclHal

 

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 chassis [ixGetChassisID $host]

 

set chassis [chassis cget -id]

set card 87

set port 1

set portList [list [list $chassis $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

}

 

# NOTE: Sonet header needs to be configured to sonetRpr before

# the user can configure any RPR streams

 

# Make sure we have all the default with sonetRpr before

# configuring anything on the port

if [port isValidFeature $chassis $card $port $::portFeatureRpr] {

port setFactoryDefaults $chassis $card $port

 

if [sonet get $chassis $card $port] {

ixPuts "Error getting sonet on $chassis $card $port"

return $TCL_ERROR

}

sonet config -header sonetRpr

 

if [sonet set $chassis $card $port] {

ixPuts "Error setting sonet on $chassis $card $port"

return $TCL_ERROR

}

} else {

ixPuts "Port $chassis.$card.$port doesn't support RPR"

return $TCL_ERROR

}

 

ixWritePortsToHardware portList

 

stream setDefault

stream config -rateMode usePercentRate

stream config -framesize 1000

stream config -frameSizeType sizeFixed

 

rprFairness setDefault

rprFairness config -repeatInterval 10

rprFairness config -packetType rprFairnessPacket

rprFairness config -serviceClass rprServiceClassB

rprFairness config -enableWrapEligible true

rprFairness config -enableOddParity true

 

if [rprFairness set $chassis $card $port] {

ixPuts "Error setting rprFairness on $chassis $card $port"

return $TCL_ERROR

}

 

set sn 1

 

################ RPR Topology ################

 

# NOTE: protocol need to be configured before rprRingControl or

# any other RPR objects

 

protocol setDefault

protocol config -appName RprTopology

 

rprRingControl setDefault

rprRingControl config -ttl 5

rprRingControl config -extendedFrame 1

 

if [rprRingControl set $chassis $card $port] {

ixPuts "Error setting rprRingControl on $chassis $card $port"

return $TCL_ERROR

}

 

 

rprTopology clearAllTlvs

 

rprTlvIndividualBandwidth clearAllBandwidthPairs

rprTlvBandwidthPair setDefault

rprTlvBandwidthPair config -bandwidth0 11

rprTlvBandwidthPair config -bandwidth1 11

rprTlvIndividualBandwidth addBandwidthPair

 

rprTlvBandwidthPair setDefault

rprTlvBandwidthPair config -bandwidth0 22

rprTlvBandwidthPair config -bandwidth1 22

rprTlvIndividualBandwidth addBandwidthPair

 

rprTlvIndividualBandwidth setDefault

rprTopology addTlv rprIndividualBandwidth

 

rprTlvWeight setDefault

rprTlvWeight config -weightRinglet0 1

rprTlvWeight config -weightRinglet1 1

rprTopology addTlv rprWeight

 

rprTlvTotalBandwidth setDefault

rprTlvTotalBandwidth config -bandwidthRinglet0 1

rprTlvTotalBandwidth config -bandwidthRinglet1 1

rprTopology addTlv rprTotalBandwidth

 

rprTlvNeighborAddress setDefault

rprTlvNeighborAddress config -neighborMacEast {00 00 00 00 00 01}

rprTlvNeighborAddress config -neighborMacWest {00 00 00 00 00 02}

rprTopology addTlv rprNeighborAddress

 

rprTlvStationName setDefault

rprTlvStationName config -stationName newyorkcity

rprTopology addTlv rprStationName

 

rprTlvVendorSpecific setDefault

rprTlvVendorSpecific config -companyId {99 AA BB}

rprTlvVendorSpecific config -dependentId {23 45 67}

rprTlvVendorSpecific config -vendorData {11 11 11 10}

rprTopology addTlv rprVendorSpecific

 

rprTopology setDefault

rprTopology config -enableOverrideControlVersion $::false

rprTopology config -controlVersion 0

rprTopology config -enableOverrideControlType $::false

rprTopology config -controlType 1

 

if [rprTopology set $chassis $card $port] {

ixPuts "Error setting rprTopology on $chassis $card $port"

return $TCL_ERROR

}

 

stream config -name "RPR Topology"

if [stream set $chassis $card $port $sn] {

ixPuts "Error setting stream on $chassis $card $port $sn"

return $TCL_ERROR

}

incr sn

 

################ RPR Protection ################

 

protocol config -appName RprProtection

 

rprRingControl setDefault

rprRingControl config -ttl 5

rprRingControl config -ttlBase 6

 

if [rprRingControl set $chassis $card $port] {

ixPuts "Error setting rprRingControl on $chassis $card $port"

return $TCL_ERROR

}

 

rprProtection setDefault

rprProtection config -sequenceNumber 1

rprProtection config -protectionRequestEast rprWaitToRestore

rprProtection config -protectionRequestWest rprWaitToRestore

rprProtection config -enableOverrideControlType $::false

rprProtection config -controlType 2

 

if [rprProtection set $chassis $card $port] {

ixPuts "Error setting rprProtection on $chassis $card $port"

return $TCL_ERROR

}

stream config -name "RPR Protection"

 

if [stream set $chassis $card $port $sn] {

ixPuts "Error setting stream on $chassis $card $port $sn"

return $TCL_ERROR

}

incr sn

 

################ RPR OAM ################

 

protocol config -appName RprOam

rprOam setDefault

rprOam config -typeCode $::rprOamFlush

rprOam config -flushReserved 18

 

if [rprOam set $chassis $card $port] {

ixPuts "Error setting rprOam on $chassis $card $port"

return $TCL_ERROR

}

stream config -name "RPR OAM"

 

if [stream set $chassis $card $port $sn] {

ixPuts "Error setting stream on $chassis $card $port $sn"

return $TCL_ERROR

}

incr sn

 

################ RPR TCP/IP ################

 

protocol config -name ipV4

protocol config -appName 0

protocol config -ethernetType noType

 

ip setDefault

ip config -ipProtocol tcp

 

if [ip set $chassis $card $port] {

ixPuts "Error ip stream on $chassis $card $port"

return $TCL_ERROR

}

stream config -name "RPR TCP/IP"

 

if [stream set $chassis $card $port $sn] {

ixPuts "Error setting stream on $chassis $card $port $sn"

return $TCL_ERROR

}

incr sn

 

################ RPR ARP ################

 

protocol setDefault

protocol config -name mac

protocol config -appName Arp

protocol config -ethernetType noType

 

rprRingControl setDefault

rprRingControl config -enableWrapEligible $::true

rprRingControl config -enableOddParity $::false

 

if {[rprRingControl set $chassis $card $port]} {

ixPuts "Error setting rprRingControl on $chassis $card $port"

return $TCL_ERROR

}

 

arp setDefault

arp config -sourceProtocolAddr 9.9.9.3

arp config -destProtocolAddr 8.8.8.3

 

if [arp set $chassis $card $port] {

ixPuts "Error setting arp on $chassis $card $port"

return $TCL_ERROR

}

stream config -name "RPR ARP"

if [stream set $chassis $card $port $sn] {

ixPuts "Error setting stream on $chassis $card $port $sn"

return $TCL_ERROR

}

 

ixWriteConfigToHardware portList

 

stat get statAllStats $chassis $card $port

stat cget -rprFairnessFramesReceived

stat getRate statRprPayloadCrcErrors $chassis $card $port

 

#

# Managing the Tlvs

#

 

set tlvObjectPointer [rprTopology getFirstTlv]

set tlvType [$tlvObjectPointer cget -type]

 

showCmd $tlvObjectPointer

 

# 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

rprOam, rprProtection, rprRingControl, rprTlvBandwidthPair, rprTlvIndividualBandwidth, rprTlvNeighborAddress, rprTlvStationName, rprTlvTotalBandwidth, rprTlvVendorSpecific, rprTlvWeight, rprTopology.