ppp
ppp - configure Point-To-Point Protocol parameters
SYNOPSIS
ppp sub-command options
DESCRIPTION
This command is used to configure PPP parameters on OC-* interfaces for Packet over Sonet ports.
STANDARD OPTIONS
activeNegotiation
true/false
Activate Negotiation process. (default = true)
configurationRetries
Maximum number of configuration requests to send before starting termination process. (default = 9)
enable true | false
Enable PPP negotiations. (default = false)
enableAccmNegotiation true | false
Enables ACCM (Asynchronous Control Character Mask). (default = false)
enableIp true | false
Enables the IPV6 Network Control protocol. (default = true)
enableIpV6 true | false
Enables the IP Network Control protocol. The port's desired IP address is held in the localIPAddress option. (default = false)
enableLqm true | false
Enables the LQM (Line Quality Monitoring Protocol). The LQM reporting interval is controlled by the lqmReportInterval option. (default = false)
enableMpls true | false
Enables the MPLS Network Control protocol. (default = true)
enableOsi true | false
Enables the OSI Network Control protocol. The port's desired transmitted and received alignments are held in the rxAlignment and txAlignment options. (default = true)
localIPAddress
Local port's IP address. (default = 0.0.0.1)
localIpV6Iid
When the value of localIpV6IdType is pppIpV6IdTypeIpV6, this value is used to generate an Interface ID. (default = {00 00 00 00 00 00 00 00})
localIpV6IdType
The type of Interface Identifier, which is a configuration option sent in the configuration request packet. The choices are:
Option |
Value |
Usage |
---|---|---|
pppIpV6IdTypeLastNegotiated |
4 |
The last Interface Identifier that was negotiated for this link is used. |
pppIpV6IdTypeMacBased |
1 |
The Interface Identifier is derived from the MAC address in localIpV6MacBased Iid. |
pppIpV6IdTypeIpV6 |
2 |
The Interface Identifier is the 64-bit EUI-64 identifier found in localIpV6Iid. |
pppIpV6IdTypeRandom |
8 |
(default) The Interface Identifier is randomly generated. |
localIpV6MacBasedIid
When the value of localIpV6IdType is pppIpV6IdTypeMacBased, this value is used to generate a globally unique Interface ID. (default = {00 00 00 00 00 00 00 00})
localIpV6NegotiationMode
Before the negotiation of the Interface Identifier (Iid), the node chooses a tentative Interface-Identifier. The choices are:
Option |
Value |
Usage |
---|---|---|
pppIpLocalNegotiationLocalMay |
0 |
(default) The local node may use the Iid mode and the Iid value specified in localIpV6IdType, localIpV6MacBasedIid and localIpV6Iid. |
pppIpLocalNegotiationLocalMust |
1 |
The local node must use the Iid mode and the Iid value specified in localIpV6IdType, localIpV6MacBasedIid and localIpV6Iid. |
pppIpLocalNegotiationPeerMust |
2 |
The peer node must supply the local Iid. |
lqmReportInterval
The desired LQM report interval, expressed in seconds. (default = 10.0)
peerIpV6Iid
When the value of peerIpV6IdType is pppIpV6IdTypeIpV6, this IPv6 address is used to generate an Interface ID. This value must be unique on the link. (default = {00 00 00 00 00 00 00 00})
peerIpV6IdType
The type of Interface Identifier. The choices are:
Option |
Value |
Usage |
---|---|---|
pppIpV6IdTypeLastNegotiated |
0 |
The last Interface Identifier that was negotiated for this link is used. |
pppIpV6IdTypeMacBased |
1 |
The Interface Identifier is derived from the MAC address in peerIpV6MacBased Iid. |
pppIpV6IdTypeIpV6 |
2 |
The Interface Identifier is the 64-bit EUI-64 identifier found in peerIpV6Iid. |
pppIpV6IdTypeRandom |
8 |
(default) The Interface Identifier is randomly generated. |
peerIpV6MacBasedIid
When the value of peerIpV6IdType is pppIpV6IdTypeMacBased, this value is used to generate a globally unique Interface ID. This value must be unique on the link. (default = {00 00 00 00 00 00 00 00})
peerIpV6NegotiationMode
The peer Interface Id negotiation mode. The choices are:
Option |
Value |
Usage |
---|---|---|
pppIpPeerNegotiationPeerMay |
0 |
(default) The peer node may use the Iid mode and the Iid value specified in peerIpV6IdType, peerIpV6MacBasedIid and peerIpV6Iid. |
pppIpPeerNegotiationPeerMust |
1 |
The peer node must use the Iid mode and the Iid value specified in peerIpV6IdType, peerIpV6MacBasedIid and peerIpV6Iid. |
pppIpPeerNegotiationLocalMust |
2 |
The local node must supply the peer Iid. |
retryTimeout
Time, in seconds, to wait between configuration and termination retries. (default = 3)
rxAlignment
The desired OSI receive byte alignment (within a 4-byte word), expressed as a byte position from 0 to 3. (default = 0)
rxMaxReceiveUnit
Maximum frame size in receive direction. (default = 65535)
terminationRetries
Max # of termination requests to send before bringing PPP down. (default = 3)
txAlignment
The desired OSI transmit byte alignment (within a 4-byte word), expressed as a byte position from 0 to 3. (default = 0)
txMaxReceiveUnit
Maximum frame size in transmit direction. (default = 65535)
useMagicNumber
true/false
Enable negotiation and use of magic number; used to detect looped back connection. (default = true)
COMMANDS
The ppp command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
ppp cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the ppp command.
ppp config option value
Modify the PPP configuration options of the port. If no option is specified, returns a list describing all of the available PPP options (see STANDARD OPTIONS) for port.
ppp get chasID cardID portID [circuitID]
Gets the current configuration of the PPP parameters on circuit circuitID, port with id portID on card cardID, chassis chasID. from its hardware. Call this command before calling ppp 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.
ppp set chasID cardID portID [circuitID]
Sets the configuration of the PPP parameters in IxHAL on circuit circuitID, port with id portID on card cardID, chassis chasID by reading the configuration option values set by the ppp 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.
ppp setDefault
Sets to IxTclHal default values for all configuration options.
ppp write chasID cardID portID
Writes the ppp config to the ppp state machine and restarts ppp autonegotiation. Writes or commits the changes in IxHAL to hardware for each port with id portID on card cardID, chassis chasID. Before using this command, use the ppp set command to configure the port related parameters in IxHAL. 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
- Network error between the client and chassis
- The port is not a Packet over Sonet port
Note: Not available at circuit level.
EXAMPLES
package require IxTclHal
# Procedure to get and print the status of a POS port
proc getState {chas card port} \
{
# Get all of the status information
pppStatus get $chas $card $port
# IP related information
set ipState [pppStatus cget -ipState]
set ipAddr [pppStatus cget -localIPAddress]
set ipPeerAddr [pppStatus cget -peerIPAddress]
# LQM State information
set lqmState [pppStatus cget -lqmQualityState]
set lqmRxInterval [pppStatus cget -lqmReportIntervalRx]
set lqmTxInterval [pppStatus cget -lqmReportIntervalTx]
# MPLS state
set mplsState [pppStatus cget -mplsState]
# OSI information
set osiState [pppStatus cget -osiState]
set rxAlignment [pppStatus cget -rxAlignment]
set txAlignment [pppStatus cget -txAlignment]
# Magic numbers
set magicRxState [pppStatus cget -useMagicNumberRx]
set magicTxState [pppStatus cget -useMagicNumberTx]
# Negotiated MRUs
set rxMRU [pppStatus cget -rxMaxReceiveUnit]
set txMRU [pppStatus cget -txMaxReceiveUnit]
ixPuts "Port $chas:$card:$port"
ixPuts "\tMRU:\trxMaxReceiveUnit $rxMRU, txMaxReceiveUnit $txMRU"
ixPuts "\tMagic:\tuseMagicNumberRx $magicRxState, useMagicTxState $magicTxState"
ixPuts "\tLQM:\tlqmReportIntervalRx $lqmRxInterval, lqmReportIntervalTx $lqmTxInterval"
ixPuts "\tIP:\tstate $ipState, localIpAddress $ipAddr, peerIpAddress $ipPeerAddr"
ixPuts "\tOSI:\tstate $osiState, rxAlignment $rxAlignment, txAlignment $txAlignment"
ixPuts "\tMPLS:\tstate $mplsState"
}
# Symbolic definition of the PPP related port link states
# Not all states are necessarily defined
set pppState($::pppOff) "pppOff\t"
set pppState($::pppUp) "pppUp\t"
set pppState($::pppDown) "pppDown\t"
set pppState($::pppInit) "pppInit\t"
set pppState($::pppWaitForOpen) "pppWaitForOpen"
set pppState($::pppAutoNegotiate) "pppAutoNegotiate"
set pppState($::pppClose) "pppClose"
set pppState($::pppConnect) "pppConnect"
set pppState($::pppRestartNegotiation) "pppRestartNegotiation"
set pppState($::pppRestartInit) "pppRestartInit"
set pppState($::pppRestartWaitForOpen) "pppRestartWaitForOpen"
set pppState($::pppRestartWaitForClose) "pppRestartWaitForClose"
set pppState($::pppRestartFinish) "pppRestartFinish"
set pppState($::pppClosing) "pppClosing"
set pppState($::pppLcpNegotiate) "pppLcpNegotiate"
set pppState($::pppAuthenticate) "pppAuthenticate"
set pppState($::pppNcpNegotiate) "pppNcpNegotiate"
set pppState($::lossOfFrame) "lossOfFrame"
# Connect to chassis and get chassis ID
set host galaxy
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 OC12 card is in slot 2
# And that port 1 is directly connected to port 2
set card 2
set portList [list [list $chas $card 1] [list $chas $card 2]]
# 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 != $::interfacePacketOverSonet} \
{
ixPuts "Card $card is not an OC12c POS card"
return 1
}
# Disable PPP negotiation and tell both ports to stop
ppp config -enable disable
ppp set $chas $card 1
ppp set $chas $card 2
ppp write $chas $card 1
ppp write $chas $card 2
# Start with a default setup, enable PPP and set auto negotiation
ppp setDefault
ppp config -enable enable
ppp config -activeNegotiation true
# Enable IP address negotation and set our desired IP address
ppp config -enableIp enable
ppp config -localIPAddress 192.168.5.100
# Enable MPLS negotiation
ppp config -enableMpls enable
# Enable magic number negotiation
ppp config -useMagicNumber true
# Enable LQM and set the desired report interval to 1.2 seconds
ppp config -enableLqm enable
ppp config -lqmReportInterval 1.2
# Enable OSI negotiation with alignment at byte 2
ppp config -enableOsi enable
ppp config -rxAlignment 2
ppp config -txAlignment 2
# Set PPP parameters to port 1
ppp set $chas $card 1
ppp write $chas $card 1
# When two Ixia ports are connected directly, only one can use recovered clock
sonet setDefault
sonet config -useRecoveredClock false
sonet set $chas $card 1
set portList [list [list $chas $card 1]]
ixWritePortsToHardware portList
# Change the requested address for the second port
ppp config -localIPAddress 192.168.6.100
ppp set $chas $card 2
ppp write $chas $card 2
# Now monitor and print the port link state until both ports show up or a minute
# Has gone by
ixPuts "Link state monitoring"
ixPuts "Port 1\t\t\tPort 2"
ixPuts "------\t\t\t------"
for {set i 0} {$i < 60} {incr i} \
{
after 1000
port get $chas $card 1
set portState1 [port cget -linkState]
port get $chas $card 2
set portState2 [port cget -linkState]
ixPuts "$pppState($portState1)\t\t$pppState($portState2)"
if {$portState1 == $::pppUp && $portState2 == $::pppUp} {break}
}
# If both ports went to pppUp, then get and print the state for each
if {$portState1 == $::pppUp && $portState2 == $::pppUp} \
{
getState $chas $card 1
getState $chas $card 2
}
# Now wait for two received LQM reports on port 1
for {set i 0} {$i < 10} {incr i} \
{
after 1000
pppStatus get $chas $card 1
set lqmRxCounter [pppStatus cget -lqmReportPacketCounterRx]
if {$lqmRxCounter >= 2} {
ixPuts "Received 2 LQM reports"
break
}
}
# 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
}