atmOam
atmOam - configure ATM OAM messages to be transmitted
SYNOPSIS
atmOam sub-command options
DESCRIPTION
The atmOam command is used to configure multiple ATM OAM messages to be transmitted on an ATM port. The basic parameters for all OAM messages are configured in the options of this command. Additional parameters that are particular to a specific OAM message are taken from the following additional commands: atmOamActDeact, atmOamAis, atmOamFaultManagementCC, atmOamFaultManagementLB or atmOamRdi.
Once configured, the OAM message for a VPI/VCI pair is added to the list associated with this command with the add sub-command. Transmission of the OAM messages is initiated with the start sub-command and stopped with the stop sub-command.
Trace information, if enabled with the enableTrace option is retrieved using the atmOamTrace command.
STANDARD OPTIONS
cellFlowType
The cell flow type for the OAM message.
Option |
Value |
Usage |
---|---|---|
atmOamF4 |
0 |
F4 flow. |
atmOamF5 |
1 |
(default) F5 flow. |
enableCC true | false
If true, enables continuous checking. (default = false)
enableLB true | false
If true, enables loopback. (default = false)
enableTrace
true | false
If true, trace messages per registered VPI/VCI pair is enabled. (default = false)
enableTx true | false
If true, the current OAM message is enabled for transmission. (default = true)
endPointsType
The endpoint type.
Option |
Value |
Usage |
---|---|---|
atmOamEndToEnd |
0 |
(default) End to end. |
atmOamSegment |
1 |
Segment. |
functionType
The OAM function to be performed.
Option |
Value |
Usage |
---|---|---|
atmOamAis |
0 |
(default) AIS. Additional message options are obtained from the atmOamAis command. |
atmOamRdi |
1 |
RDI. Additional message options are obtained from the atmOamRdi command. |
atmOamFaultMgmtCC |
2 |
Fault Management CC. Additional message options are obtained from the atmOamFaultManagementCC command. |
atmOamFaultMgmtLB |
3 |
Fault Management LB. Additional message options are obtained from the atmOamFaultManagementLB command. |
atmOamActDeactCC |
4 |
Activate-Deactivate. Additional message options are obtained from the atmOamActDeact command. |
vci
Read-only. The VCI for the registered OAM cell for list entries retrieved by one of the get sub-commands. The VCI value is set in the add sub-command. (default = 0)
vpi
Read-only. The VPI for the registered OAM cell for list entries retrieved by one of the get sub-commands. The VPI value is set in the add sub-command (default = 0)
COMMANDS
The atmOam command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
atmOam add vpi vci
Adds the VPI/VCI pair to the OAM list for the indicated port. Based on the OAM type specified in functionType, additional message options are taken from one of the atmOamActDeact, atmOamAis, atmOamFaultManagementCC, or atmOamRdi commands. Specific errors are:
- select has not been called
- The port is in use by another user
- ATM is not supported on this port
- Invalid port
- The maximum number of ATM OAM entries has been exceeded.
- The VPI/VCI is already in the list.
atmOam cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the atmOam command.
atmOam config option value
Modify the configuration options of the atmOam. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for atmOam.
atmOam del vpi vci
Removes the VPI/VCI pair from the OAM list for the indicated port. Specific errors are:
- select has not been called
- The port is in use by another user
- ATM is not supported on this port
- The VPI/VCI pair is not in the list
atmOam get FirstPair
Accesses the first VPI/VCI pair in the list, whose values can be found in the STANDARD OPTIONS for this command and the functionType specific commands. Specific errors are:
- select has not been called
- No connection to the chassis
- ATM is not supported on this port
- Invalid port
- No pairs in the list.
atmOam get NextPair
Accesses the next VPI/VCI pair in the list, whose values can be found in the STANDARD OPTIONS for this command and the functionType specific commands. Specific errors are:
- select has not been called
- getFirstPair has not been called
- ATM is not supported on this port
- Invalid port
- No more pairs in the list.
atmOam removeAll
Removes all VPI/VCI pairs from the OAM list for the indicated port. Specific errors are:
- select has not been called
- ATM is not supported on this port
- The port is in use by another user
- Invalid port
atmOam select chasID cardID portID
Accesses the indicated port. All other sub-commands uses this port. Specific errors are:
- No connection to the chassis
- Invalid port specified
- Port is not available
- ATM OAM is not an available feature for the port
atmOam setDefault
Sets to IxTclHal default values for all configuration options.
atmOam start chasID cardID portID
Starts transmission of the ATM OAM messages on the indicated port. Specific errors are:
- No connection to the chassis
- ATM is not supported on this port
- The port is in use by another user
- Invalid port
atmOam stop chasID cardID portID
Stops transmission of the ATM OAM messages on the indicated port. Specific errors are:
- No connection to the chassis
- ATM is not supported on this port
- The port is in use by another user
- Invalid port
- Transmission has not been started
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 chassId [ixGetChassisID $host]
set cardId 26
set portId 1
set portList [list [list $chassId $cardId $portId]]
# 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
}
if [port isValidFeature $chassId $cardId $portId $::portFeatureAtmPos] {
port setFactoryDefaults $chassId $cardId $portId
port config -portMode portAtmMode
if {[port set $chassId $cardId $portId] } {
errorMsg "Error setting port on port $chassId $cardId $portId"
return 1
}
stat config -enableAtmOamStats $::true
if {[stat set $chassId $cardId $portId] } {
errorMsg "Error setting stats on port $chassId $cardId $portId"
return 1
}
atmOamTrace config -maxNumTrace 50
if {[atmOamTrace set $chassId $cardId $portId]} {
errorMsg "Error setting oam trace for port $chassId $cardId $portId"
set retCode "FAIL"
}
} else {
errorMsg "Port $chassId:$cardId:$portId is not an ATM port"
return 1
}
ixWritePortsToHardware portList
if {[atmOam select $chassId $cardId $portId]} {
errorMsg "Error selecting atmOam on $chassId $cardId $portId."
return 1
}
atmOam removeAll
atmOam setDefault
atmOam config -functionType atmOamFaultMgmtLB
atmOam config -cellFlowType atmOamF5
atmOam config -endPointType atmOamSegment
atmOam config -enableLB true
atmOam config -enableCC true
atmOam config -enableTrace true
atmOam config -enableTx true
atmOamFaultManagementLB config -enableTxContinuous false
atmOamFaultManagementLB config -txCount 5
atmOamFaultManagementLB config -loopbackIndication atmOamReply
atmOamFaultManagementLB config -correlationTag "11 11 11 11"atmOamFaultManagementLB config -loopbackLocationId "55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55"
if [atmOam add 31 32] {
ixPuts $::ixErrorInfo
return 1
}
atmOam setDefault
atmOam config -functionType atmOamAis
atmOam config -cellFlowType atmOamF4
atmOam config -endPointType atmOamEndToEnd
atmOam config -enableLB true
atmOam config -enableCC true
atmOam config -enableTrace true
atmOam config -enableTx true
atmOamAis config -enableTxContinuous false
atmOamAis config -txCount 6
if [atmOam add 33 4] {
ixPuts $::ixErrorInfo
return 1
}
atmOam setDefault
atmOam config -functionType atmOamRdi
atmOam config -cellFlowType atmOamF4
atmOam config -endPointType atmOamSegment
atmOam config -enableLB true
atmOam config -enableCC false
atmOam config -enableTrace true
atmOam config -enableTx true
atmOamRdi config -enableTxContinuous false
atmOamRdi config -txCount 8
if [atmOam add 14 4] {
ixPuts $::ixErrorInfo
return 1
}
atmOam setDefault
atmOam config -functionType atmOamFaultMgmtCC
atmOam config -cellFlowType atmOamF4
atmOam config -endPointType atmOamEndToEnd
atmOam config -enableLB false
atmOam config -enableCC true
atmOam config -enableTrace true
atmOam config -enableTx true
atmOamFaultManagementCC config -enableTxContinuous false
atmOamFaultManagementCC config -txCount 4
if [atmOam add 37 4] {
ixPuts $::ixErrorInfo
return 1
}
atmOam setDefault
atmOam config -functionType atmOamActDeactCC
atmOam config -cellFlowType atmOamF5
atmOam config -endPointType atmOamSegment
atmOam config -enableLB true
atmOam config -enableCC false
atmOam config -enableTrace false
atmOam config -enableTx true
atmOamActDeact config -enableTxContinuous false
atmOamActDeact config -txCount 11
atmOamActDeact config -messageId atmOamDeactivate
atmOamActDeact config -action atmOamAB
atmOamActDeact config -correlationTag 0x11
if [atmOam add 1 2] {
ixPuts $::ixErrorInfo
return 1
}
ixWriteConfigToHardware portList
set numTrace 10
set maxNumTrace 50
set numTracePerDirection [expr $numTrace/2]
set oamTxFMLB 5
set oamTxRDI 8
ixCheckLinkState portList
ixClearStats portList
after 1000
if {[atmOam start $chassId $cardId $portId]} {
errorMsg "Error starting oam transmit on port $chassId $cardId $portId"
return 1
}
after 3000
atmOamTrace setDefault
while {[atmOamTrace cget -numTrace] != $maxNumTrace } {
if {[atmOamTrace get $chassId $cardId $portId]} {
errorMsg "Error getting oam trace for port $chassId $cardId $portId"
return 1
}
after 1000
}
if {[atmOamTrace getFirst]} {
errorMsg "Error getting first trace for port $chassId $cardId $portId"
return 1
}
stat get allStats $chassId $cardId $portId
set oamTxFMLB [stat cget -atmOamTxFaultMgmtLB]
set oamTxRDI [stat cget -atmOamTxFaultMgmtRDI]
# Now use the hight level APIs
if {[ixStartAtmOamTransmit portList ]} {
errorMsg "Error ixStartAtmOamTransmit"
return 1
}
if {[ixStopAtmOamTransmit portList ]} {
errorMsg "Error ixStopAtmOamTransmit"
return 1
}
# 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
}
return 0
SEE ALSO
atmOamActDeact, atmOamAis, atmOamFaultManagementCC, atmOamRdi, atmOamTrace, atmPort.