icmpV6
icmpV6 - configure the ICMPv6 parameters for a port on a card on a chassis
SYNOPSIS
icmpV6 sub-command options
DESCRIPTION
The icmpV6 command is used to define the ICMPv6 header type. ICMPv6 is used by IPv6 nodes to report errors encountered in processing packets, and to perform other internet-layer functions, such as diagnostics (ICMPv6 "ping"). ICMPv6 is an integral part of IPv6 and MUST be fully implemented by every IPv6 node.
IcmpV6 messages are groupted into classes:
- error messages: icmpV6Error.
- nformational messages: icmpV6Informational.
- multicast listener discovery messages: icmpV6MulticastListener
- neighbor discovery messages:icmpV6NeighborDiscovery.
STANDARD OPTIONS
type
Read-only. The type of ICMPv6 message to be sent. Options are:
Option |
Value |
Usage |
---|---|---|
icmpV6DestUnreach-ableMessage |
1 |
(default) when a destination is unreachable |
icmpV6PacketTooBig |
2 |
when a packet is too big |
icmpV6TimeExceededMessage |
3 |
when hop limit is exceeded in transit |
icmpV6Parameter ProblemMessage |
4 |
when erroneous header field is encountered |
icmpV6EchoRequest Message |
128 |
when network connection is to be tested (by ping command test the validity of IP address) |
icmpV6EchoReply Message |
129 |
when echoRequest is received |
icmpV6MulticastListen-erQueryMessage |
130 |
multicast listener query |
icmpV6MulticastListen-erReportMessage |
131 |
multicast listener report |
icmpV6MulticastListen-erDoneMessage |
132 |
multicast listener done |
icmpV6RouterSolicita-tionMessage |
133 |
router solicitation |
icmpV6RouterAdver-tisementMessage |
134 |
router advertisement |
icmpV6NeighborSolici-tationMessage |
135 |
neighbor solicitation |
icmpV6NeighborAdver-tisementMessage |
136 |
neighbor advertisement |
icmpV6RedirectMes-sage |
137 |
when the gateway and the host identified by the internet source address of the datagram are on the same network |
COMMANDS
The icmpV6 command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
icmpV6 cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the icmpV6 command.
icmpV6 config option value
Modify the ICMPv6 configuration options of the port. If no option is specified, returns a list describing all of the available ICMPv6 options for port (see STANDARD OPTIONS).
icmpV6 decode capFrame [chasID cardID portID circuitID]
Decodes a captured frame in the capture buffer and updates TclHal. icmpV6 cget option command can be used after decoding to get the option data. Specific errors are:
- No connection to a chassis
- Invalid port number
- The captured frame is not a valid Icmpv6 frame
icmpV6 get chasID cardID portID
Gets the current ICMPv6 configuration of the port with id portID on card cardID, chassis chasID. Note that stream get must be called before this command's get sub-command. Call this command before calling icmpV6 cget option value to get the value of the configuration option. Specific errors are:
- No connection to a chassis
- Invalid port number
- Protocol data for this port is not yet set
icmpV6 set chasID cardID portID
Sets the ICMPv6 configuration of the port with id portID on card cardID, chassis chasID by reading the configuration option values set by the icmpV6 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
icmpV6 setDefault
Sets to IxTclHal default values for all configuration options.
icmpV6 setType messageType
Sets the message type. See the standard option type on page A- for a complete list.
EXAMPLES
package req IxTclHal
chassis add loopback
set chasId [chassis cget -id]
set cardId 2
set portId 3
set streamId 1
stream setDefault
stream config -framesize 200
# Configure protocol
protocol setDefault
protocol config -name ipV6
protocol config -ethernetType ethernetII
icmpV6 setDefault
icmpV6 setType icmpV6RouterAdvertisementMessage
icmpV6NeighborDiscovery setDefault
icmpV6NeighborDiscovery config -currentHopLimit 3
icmpV6NeighborDiscovery config -enableManagedAddressConfig $::true
icmpV6NeighborDiscovery config -enableOtherStatefulConfig $::true
icmpV6NeighborDiscovery config -routerLifetime 10
icmpV6NeighborDiscovery config -reachableTime 100
icmpV6NeighborDiscovery config -retransTimer 1000
icmpV6OptionPrefixInformation setDefault
icmpV6OptionPrefixInformation config -length 100
icmpV6OptionPrefixInformation config -prefixLength 200
icmpV6OptionPrefixInformation config -enableLinkFlag $::true
icmpV6OptionPrefixInformation config -enableAutonomousAddressConfig $::true
icmpV6OptionPrefixInformation config -enableRouterAddress $::true
icmpV6OptionPrefixInformation config -enableSitePrefix $::true
icmpV6OptionPrefixInformation config -preferredLifetime 2
icmpV6OptionPrefixInformation config -prefix "1111:1111:11:0:0:0:0:2"
if {[icmpV6NeighborDiscovery addOption icmpV6OptionPrefixInformation]} {
ixPuts "Error addOption icmpV6OptionPrefixInformation (icmpV6OptionPrefixInformation) on port $chasId.$cardId.$portId"
}
if {[icmpV6 set $chasId $cardId $portId ]} {
ixPuts "Error setting icmpV6 on port $chasId.$cardId.$portId"
}
# Configure ipV6
ipV6 setDefault
ipV6 config -trafficClass 3
ipV6 config -sourceAddr {1:2:3:0:0:0:0:0}
ipV6 config -sourceMask 64
ipV6 config -sourceAddrMode ipV6Idle
ipV6 config -sourceStepSize 1
ipV6 config -sourceAddrRepeatCount 10
ipV6 config -destAddr {4:5:6:0:0:0:0:0}
# Clear all the extension headers
ipV6 clearAllExtensionHeaders
# Add ipV4ProtocolIpv6Icmp
if {[ipV6 addExtensionHeader ipV4ProtocolIpv6Icmp ]} {
ixPuts "Error adding ipV4ProtocolIpv6Icmp"
}
if {[ipV6 set $chasId $cardId $portId ]} {
ixPuts "Error setting ipV6 on port $chasId.$cardId.$portId"
}
# Set and write the stream
if {[stream set $chasId $cardId $portId $streamId]} {
ixPuts "Error setting stream $streamId on port $chasId.$cardId.$portId"
}
if {[stream write $chasId $cardId $portId $streamId]} {
ixPuts "Error writing stream $streamId on port $chasId.$cardId.$portId"
}
SEE ALSO
icmpV6Error, icmpV6Informational, icmpV6MulticastListener, icmpV6NeighborDiscovery,icmpV6OptionLinkLayerDestination, icmpV6OptionLinkLayerSource, icmpV6OptionMaxTransmissionUnit, icmpV6OptionPrefixInformation, icmpV6OptionRedirectedHeader, icmpV6OptionUserDefine, icmpV6UserDefine.