frameRelay
frameRelay - configure the Frame Relay header for a Packet over Sonet frame
SYNOPSIS
frameRelay sub-command options
DESCRIPTION
The frameRelay command is used to configure the Frame Relay parameters.
Note: To configure the frameRelay parameters, sonet config -header needs to be configured for the right Frame Relay headers first. Note that stream get must be called before this command's get sub-command.
STANDARD OPTIONS
addressSize
Address length in the Frame Relay frame header. (default = 2)
becn
Backward congestion notification bit in the Frame Relay address field. ( default = 0)
commandResponse
Command or Response bit in the Frame Relay address field. (default = 0)
control
Control information. (default = 3)
counterMode
For multiple DLCIs where supported, this is the DLCI incrementing mode. Options include:
Option |
Value |
Usage |
---|---|---|
frameRelayIncrement |
0 |
Increment for the number of values set in repeatCount. |
frameRelayContIncrement |
1 |
Increment continuously. |
frameRelayDecrement |
2 |
Decrement for the number of values set in repeatCount. |
frameRelayContDecrement |
3 |
Decrement continuously. |
frameRelayIdle |
4 |
(default) Don't change the DLCI. |
frameRelayRandom |
5 |
Set the DLCI to random values. |
discardEligibleBit
Discard eligible bit in the Frame Relay address field. (default = 0)
dlci
DLCI core indicator bit in the Frame Relay address field. (default = 0)
dlciCoreValue
Frame Relay address field. (default = 0)
etherType
Ethertype of protocol in use. (default = 65535)
extentionAddress0
Extention address 0 bit in theFrame Relay address field. (default = 0)
extentionAddress1
Extention address 1 bit in theFrame Relay address field. (default = 1)
extentionAddress2
Extention address 2 bit in theFrame Relay address field. (default = 0)
extentionAddress3
Extention address 3 bit in theFrame Relay address field. (default = 0)
fecn
Forward congestion notification bit in the Frame Relay address field.( default = 0)
maskSelect
For multiple DLCIs where supported. The mask is applied to the DLCI value (as expressed in hexadecimal format). The mask length is defined by the number of bytes in the address - 2, 3, or 4 bytes of 2 nibbles each. X's, 1's, and 0's may be entered. An `X' allows the defined DLCI hex character to be visible, and active. A `1' or a `0' masks the DLCI character with that value, so only the entered `1' or `0' is visible and active. (default = {00 00 00 00 00 00})
maskValue
For multiple DLCIs where supported. The dlci option masked with the maskSelect value.
Note: frameRelay on MSM10G and MSM2.5G port does not support DLCI maskValue, and the maskSelect is always forced to 0.
nlpid
Network layer protocol identifier to identify the type of upper-layer protocol transmitted in the frame. (default = 255)
repeatCount
For multiple DLCIs where supported. If counterMode is set to frameRelayIncrement or frameRelayDecrement, the number of times to change the DLCI value. (default = 16)
COMMANDS
The frameRelay command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
frameRelay cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the frameRelay command.
frameRelay config option value
Modify the configuration options of the frameRelay. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for frameRelay.
frameRelay decode capFrame chasID cardID portID [circuitID]
Decodes a captured frame in the capture buffer and updates TclHal. Specific errors are:
- No connection to a chassis
- The captured frame is not a valid Frame Relay frame
frameRelay get chasID cardID portID [circuitID]
Gets the current configuration of the frameRelay header for port with id portID on card cardID, chassis chasID from its hardware. Note that stream get must be called before this command's get sub-command. Call this command before calling frameRelay cget option value to get the value of the configuration option. Specific errors are:
- No connection to a chassis
- Invalid port number
- The port is not a Packet over Sonet port
frameRelay set chasID cardID portID [circuitID]
Sets the frameRelay configuration of the port with id portID on card cardID, chassis chasID by reading the configuration option values set by the frameRelay config option value command. Specific errors are:
- No connection to a chassis
- Invalid port number
- The port is being used by another user
- The configured parameters are not valid for this port
- The port is not a Packet over Sonet port.
frameRelay setDefault
Sets to IxTclHal default values for all configuration options.
EXAMPLES
package require 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 chas [ixGetChassisID $host]
# Assuming that an OC48 POS card is in slot 18
set card 18
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
}
# Get the type of card and check if it's the correct type
set ifType [card getInterface $chas $card]
if {$ifType != $::interfaceOc48} {
ixPuts "Card $card is not an OC48c POS card ($ifType)"
return 1
}
port setFactoryDefaults $chas $card $port
# Need to set header type to Frame Relay
sonet setDefault
sonet config -interfaceType oc48
sonet config -header sonetFrameRelay2427
if [sonet set $chas $card 1] {
ixPuts "Can't sonet set $chas:$card:1"
return 1
}
stream setDefault
stream config -percentPacketRate 100.0
stream config -rateMode usePercentRate
# Set DLCI and BECN bit
frameRelay setDefault
frameRelay config -becn 1
# Set the DLCI address to 42 and enable incrementing DLCI's
# with a mask of FO XX
frameRelay config -dlci 42
frameRelay config -repeatCount 16
frameRelay config -counterMode frameRelayIncrement
frameRelay config -maskSelect {FF 00}
frameRelay config -maskValue {F0 FF}
if [frameRelay set $chas $card $port] {
ixPuts "Can't frameRelay set $chas:$card:$port"
return 1
}
if [stream set $chas $card $port 1] {
ixPuts "Stream set failed"
return 1
}
ixWriteConfigToHardware portList
# 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
}