gre

gre - configure GRE parameters

SYNOPSIS

gre sub-command options

DESCRIPTION

The gre command is used to set GRE operation parameters.

STANDARD OPTIONS

 

enableChecksum true | false

Enables the GRE checksum when set to true . (default = true)

enableKeytrue | false

Enables the GRE authentication key when set to true, (default = true)

enableSequence

Number true | false

Enables the GRE sequence number option when set to true. (default = true)

EnableValidChecksum true | false

Setting this value to True ensures the GRE checksum value is a valid value, and returns a "Good" packet evaluation. (default = true)

key

The GRE key is an authentication key used by the receiving router to validate the GRE packets. This check box allows to edit the GRE key.

protocolType IpV4 / IpV6

Sets the protocol type.

reserved0

Sets the Reserved 0 bits in the GRE header.

reserved1

Sets the Reserve 1 bits in the GRE header

sequenceNumber

The Sequence Number is used by the receiving router to establish the order in which packets have been transmitted. This option allows to set the sequence number bits.

version

Sets the version of GRE used. GRE headers are organized differently and contain varying information, depending on the version number. (default = )

COMMANDS

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

gre cget option

Returns the current value of the configuration option gre by option. Option may have any of the values accepted by the gre command.

gre config option value

Modify the configuration options of GRE. If no option is specified, returns a list describing all of the available options for GRE.

gre get chasID cardID portID

Gets the current GRE configuration of the port with id portID on card cardID, chassis chasID. Call this command before calling gre cget option to get the value of the configuration option.

gre set chasID cardID portID

Sets the GRE configuration of the port with id portID on card cardID, chassis chasID by reading the configuration option values set by the gre config option value command.

gre setDefault

Sets to IxTclHal default values for all configuration options.

EXAMPLES

package req IxTclHal

 

set hostname loopback

 

if {[ixConnectToChassis $hostname]} {

errorMsg "error connecting $hostname chassis"

return "FAIL"

}

 

set chassId [chassis cget -id]

set cardId 2

set portId 1

set portList [list [list $chassId $cardId $portId ] ]

 

set streamId 1

 

 

stream setDefault

stream config -name "ipv6 gre ipv4"

stream config -framesize 200

 

protocol setDefault

protocol config -name ipV6

protocol config -ethernetType ethernetII

 

ip setDefault

ip config -ipProtocol ipV4ProtocolTcp

ip config -sourceIpAddr "112.1.1.1"

ip config -sourceIpMask "255.0.0.0"

if {[ip set $chassId $cardId $portId]} {

errorMsg "Error setting ip on $chassId $cardId $portId."

}

 

tcp setDefault

tcp config -offset 5

tcp config -sourcePort 10

if {[tcp set $chassId $cardId $portId]} {

errorMsg "Error setting tcp on $chassId $cardId $portId."

}

 

gre setDefault

gre config -enableKey true

gre config -enableSequenceNumber true

gre config -enableChecksum true

gre config -enableValidChecksum false

gre config -key "aa 22 33 45"

gre config -sequenceNumber "ab c1 ab c1"

gre config -version 1

gre config -reserved0 "01 ee"

gre config -reserved1 "ab c3"

# this will configure gre encapsulation ip protocol

gre config -protocolType "08 00"

if {[gre set $chassId $cardId $portId]} {

errorMsg "Error setting gre on $chassId $cardId $portId."

}

 

 

ipV6 setDefault

ipV6 config -sourceAddr "4444:4444:4444:4444:4444:444:0:0"

ipV6 config -nextHeader ipV6Routing

 

ipV6 clearAllExtensionHeaders

 

ipV6Routing setDefault

ipV6Routing config -reserved "00 00 00 00"

ipV6Routing config -nodeList "0:0:0:0:0:0:0:0"

ipV6 addExtensionHeader ipV6Routing

ipV6 addExtensionHeader ipV4ProtocolGre

 

if {[ipV6 set $chassId $cardId $portId]} {

errorMsg "Error setting ipV6 on $chassId $cardId $portId."

}

 

if [stream set $chassId $cardId $portId $streamId] {

errorMsg "Error setting stream on port $chassId $cardId $portId $streamId"

}

 

ixWriteConfigToHardware portList

 

if [stream get $chassId $cardId $portId $streamId] {

errorMsg "Error getting stream on port $chassId $cardId $portId $streamId"

}

 

# This will get the outer IP configurations

if {[ipV6 get $chassId $cardId $portId]} {

errorMsg "Error getting ipV6 on $chassId $cardId $portId."

}

ixPuts "sourceAddr: [ipV6 cget -sourceAddr]

 

# This will get the outer IP configurations

if {[gre get $chassId $cardId $portId]} {

errorMsg "Error getting gre on $chassId $cardId $portId."

}

ixPuts "key: [gre cget -key]

 

if {[ip get $chassId $cardId $portId]} {

errorMsg "Error getting ip on $chassId $cardId $portId."

}

ixPuts "ip: [ip cget -sourceIpAddr]

SEE ALSO

N/A