cancel
Showing results for 
Search instead for 
Did you mean: 

EXOS Authentication Script Error

EXOS Authentication Script Error

RobertD1
Contributor

Hello,

When I run the EXOS Authentication script against my EXOS switches I get an error when configuring the RADIUS server because it tries to use VR-Mgmt but the management IP is set for the default VLAN in virtual router VR-Default. It uses a variable for VR based on the $vendor returned so can only assume it is getting VR-Mgmt in response. I checked with another script to check the EMC_VARS and the value for vendor is "Extreme". The value for $deviceVR is nothing.

################################################################################
# Here starts the main procedure
################################################################################

IF ($vendor =="Extreme" ) THEN

set VR $deviceVR
IF ($VR == "") THEN
set VR "vr-mgmt"
ENDIF
IF ($Radius1 != "") THEN
puts "### Lets configure primary radius server. ###"
CLI configure radius netlogin 1 server $Radius1 1812 client-ip $deviceIP vr $VR shared-secret $SharedSecret
regexp {.*Invalid input detected at.*} ${CLI.OUT} foundWarning3
IF ([info exists foundWarning3]) THEN
puts "### Ok the old way. ###"
CLI configure radius netlogin primary server $Radius1 1812 client-ip $deviceIP vr $VR
CLI configure radius netlogin primary shared-secret $SharedSecret
ENDIF

If the script cannot work for this part we may have to apply the RADIUS commands separately as a workaround which is fine but would like the script to handle it? 

Error message:

* EXOS-VM.1 # configure radius netlogin 1 server 11.11.11.250 1812 client-ip 10.10.10.10 vr vr-mgmt shared-secret secret
Note: Shared secrets created with this version of software are not compatible with version 21.x and earlier.
Error: IP address 10.10.10.10 is not configured in virtual router "VR-Mgmt" for server 1.

1 ACCEPTED SOLUTION

Robert_Haynes
Extreme Employee

I assume you are using the Authentication_EXOS script found on our public GitHub scripting repository @ https://github.com/extremenetworks/ExtremeScripting/blob/master/XMC_XIQ-SE/oneview_CLI_scripts/xml/A....

The $deviceVR variable is not defined as you noted.

# @VariableFieldLabel (description = "VR")
set var deviceVR "vr-default"

OR

# @VariableFieldLabel (description = "VR", validValues = [vr-mgmt,vr-default])
set var deviceVR "vr-default"

So that when you execute the script you can populate / choose the VR you want and it'll default to whatever you prefer.

View solution in original post

2 REPLIES 2

Robert_Haynes
Extreme Employee

I assume you are using the Authentication_EXOS script found on our public GitHub scripting repository @ https://github.com/extremenetworks/ExtremeScripting/blob/master/XMC_XIQ-SE/oneview_CLI_scripts/xml/A....

The $deviceVR variable is not defined as you noted.

# @VariableFieldLabel (description = "VR")
set var deviceVR "vr-default"

OR

# @VariableFieldLabel (description = "VR", validValues = [vr-mgmt,vr-default])
set var deviceVR "vr-default"

So that when you execute the script you can populate / choose the VR you want and it'll default to whatever you prefer.

RobertD1
Contributor

I have altered the script because the value for $deviceVR is null so even though it is branching to use vr-mgmt I make sure it uses the right VR.

IF ($VR == "") THEN
#set VR "vr-mgmt"

set VR "vr-default"
ENDIF

 

 

GTM-P2G8KFN