oamHeader

oamHeader - configure the OAM header for streams.

SYNOPSIS

oamHeader sub-command options

DESCRIPTION

The oamHeader command is used to for the stream configuration for the OAM header. Port configuration for OAM is implemented by oamPort.

The remaining OAM objects are tightly coupled to this object. This object lives on the protocolStack, consistent with all other stream protocol configuration objects.

STANDARD OPTIONS
type

Read only. Set to 34825 = Slow Protocols.

subType

Read only. Set to 3 (0x03 = OAM).

flags

Byte, or'd value with enums. 2-byte flag field contains the discovery status of local and remote OAM entities, as well as fault indications. (default = 0)

Example: oamHeader config -flags [expr $::oamFlagCriticalEvent|$::oamFlagLocalEvaluating

Predefined options include:

Option

Value

Usage

oamFlagNone

0x0000

(default)

oamFlagLinkFault

0x0001

Link Fault

oamFlagDyingGasp

0x0002

Dying Gasp

oamFlagCriticalEvent

0x0004

Critical Event

oamFlagLocalEvaluating

0x0008

Local Evaluating

oamFlagLocalStable

0x0010

Local Stable

oamFlagRemoteEvaluating

0x0020

Remote Evaluating

oamFlagRemoteStable

0x0040

Remote Stable

code

PDU types. (default = oamCodeInformation)

Predefined options include:

Option

Value

Usage

oamCodeInformation

0x00

Information

oamCodeEventNotification

0x01

Event Notification

oamCodeVariableRequest

0x02

Variable Request

oamCodeVariableResponse

0x03

Variable Response

oamCodeLoopbackControl

0x04

Loopback Control

oamCodeOrgSpecific

0xFE

Organization Specific

COMMANDS

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

oamHeader setDefault

Sets to IxTclHal default values for all configuration options.

oamHeader set chasID cardID portID

Sets the OAM header and family of OAM objects into IxHal.

oamHeader get chasID cardID portID

Retrieves the OAM header and family of OAM objects from IxHal.

oamHeader decode capFrame chasID cardID portID

Decodes the OAM stream.

EXAMPLES

package req IxTclHal

set hostname astro

ixConnectToChassis $hostName

set retCode "PASS"

 

if {[ixConnectToChassis $hostName] } {

errorMsg "Error connecting to $hostName"

set retCode "FAIL"

}

set chassId [chassis cget -id]

set portList [list]

 

for { set cardId 1 } {$cardId <= [chassis cget -maxCardCount]} {incr cardId} {

if {[card get $chassId $cardId] == $::TCL_OK} {

set portId 1

if {[port isValidFeature $chassId $cardId $portId portFeatureMACSec]} {

port setModeDefaults $chassId $cardId $portId

lappend portList [list $chassId $cardId $portId]

}

}

}

if {[llength $portList] == 0} {

errorMsg "No ports in port list that support MACSec"

set retCode "FAIL"

return $retCode

}

 

 

foreach port $portList {

scan $port "%d %d %d" chassis card port

 

set streamId 1

 

oamPort setDefault

oamPort config -enable true

oamPort config -macAddress "00 00 AB BA DE AD"

oamPort config -enableLoopback true

oamPort config -enableLinkEvents true

oamPort config -maxOamPduSize 1518

oamPort config -oui "00 00 00"

oamPort config -vendorSpecificInformation "00 00 00 00"

oamPort config -idleTimer 5

oamPort config -enableOptionalTlv true

oamPort config -optionalTlvType 254

oamPort config -optionalTlvValue "11 11 11 11 11"

oamPort set $chassis $card $port

lappend portList [list $chassis $card $port]

ixWritePortsToHardware portList

ixCheckLinkState portList

 

 

 

# Stream 1

stream setDefault

stream config -name "OamStream"

stream config -enable true

stream config -framesize 200

 

protocol setDefault

protocol config -enableOAM true

 

 

oamHeader setDefault

oamHeader config -flags [expr $::oamFlagCriticalEvent|$::oamFlagLocalEvaluating|$::oamFlagLocalStable|$::oamFlagRemoteEvaluation]

oamHeader config -code oamCodeLoopbackControl

 

oamInformation clearAllTlvs

 

oamLocalInformationTlv setDefault

oamLocalInformationTlv config -revision 0

oamLocalInformationTlv config -parserAction oamParserActionForwardoamLocalInformationTlv config -multiplexerAction oamMultiplexerActionForward

oamLocalInformationTlv config -enableOamPassiveMode false

oamLocalInformationTlv config -enableUnidirectional false

oamLocalInformationTlv config -enableLinkEvents false

oamLocalInformationTlv config -enableRemoteLoopback false

oamLocalInformationTlv config -enableVariableRetrieval false

oamLocalInformationTlv config -maxPduSize 0

oamLocalInformationTlv config -oui "00 00 00"

oamLocalInformationTlv config -vendorSpecificInformation "00 00 00 00"

 

if {[oamInformation addTlv oamInformationLocalInfo} {

errorMsg "Error adding oamEventNotification oamInformationLocalInfo TLV "

}

 

oamRemoteInformationTlv setDefault

oamRemoteInformationTlv config -revision 0

oamRemoteInformationTlv config -parserAction oamParserActionForward

oamRemoteInformationTlv config -multiplexerAction oamMultiplexerActionForward

oamRemoteInformationTlv config -enableOamPassiveMode false

oamRemoteInformationTlv config -enableUnidirectional false

oamRemoteInformationTlv config -enableLinkEvents false

oamRemoteInformationTlv config -enableRemoteLoopback false

oamRemoteInformationTlv config -enableVariableRetrieval false

oamRemoteInformationTlv config -maxPduSize 0

oamRemoteInformationTlv config -oui "00 00 00"

oamRemoteInformationTlv config -vendorSpecificInformation "00 00 00 00"

 

if {[oamInformation addTlv oamInformationRemoteInfo} {

errorMsg "Error adding oamEventNotification oamInformationRemoteInfo TLV "

}

 

oamEventNotification setDefault

oamEventNotification clearAllTlvs

oamEventNotification config -sequenceNumber 0

 

oamSymbolPeriodTlv setDefault

oamSymbolPeriodTlv config -symbols 10

oamSymbolPeriodTlv config -timestamp 10

oamSymbolPeriodTlv config -window 10

oamSymbolPeriodTlv config -threshold 10

oamSymbolPeriodTlv config -errorRunningTotal 10

oamSymbolPeriodTlv config -eventRunningTotal 10

 

if {[oamEventNotification addTlv oamEventNotificationSymbol} {

errorMsg "Error adding oamEventNotification oamEventNotificationSymbol TLV "

}

 

oamSummaryTlv setDefault

oamSummaryTlv config -frameSeconds 10

oamSummaryTlv config -timestamp 10

oamSummaryTlv config -window 110

oamSummaryTlv config -threshold 110

oamSummaryTlv config -errorRunningTotal 110

oamSummaryTlv config -eventRunningTotal 110

 

if {[oamEventNotification addTlv oamEventNotificationSummary} {

errorMsg "Error adding oamEventNotification oamEventNotificationSummary TLV "

}

 

oamEventOrgTlv setDefault

oamEventOrgTlv config -oui "00 00 00"oamEventOrgTlv config -length 16

oamEventOrgTlv config -organizationSpecificValue "00 00 00 00 00 00 00 00 00 00 00"

 

if {[oamEventNotification addTlv oamEventNotificationOrgSpecific]} {

errorMsg "Error adding oamEventNotification oamEventNotificationOrgSpecific TLV "

}

 

oamVariableRequest clearAllTlvs

 

oamVariableResponse clearAllTlvs

 

oamLoopbackControl setDefault

oamLoopbackControl config -enableLoopback true

 

oamOrganizationSpecific setDefault

oamOrganizationSpecific config -oui "00 00 00"

oamOrganizationSpecific config -organizationSpecificValue "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"

 

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

errorMsg "Error setting oam header on $chassis $card $port"

}

 

if {[stream set $chassis $card $port $streamId]} {

errorMsg "Error setting oam header on $chassis $card $port"

}

 

}

 

ixWriteConfigToHardware portList -noProtocolServer

SEE ALSO

oamInformation, oamEventNotification, oamVariableRequest, oamVariableResponse, oamLoopbackControl, oamOrganizationSpecific.