HP ProCurve NAC 800 User Manual page 379

Hide thumbs Also See for ProCurve NAC 800:
Table of Contents

Advertisement

802.1X Quarantine Method
Setting up the 802.1X Components
expect (config)#
Reauthorization script:
send interface FastEthernet ${PORT}
expect (config-if)#
send eapol re-authenticate
expect (config-if)#
send exit
expect (config)#
Exit script:
send exit
expect #
send exit
expect press or to select option.
send -noreturn l
The conditions in the above scripts are driven by the values of the variables entered
by the user, but sometimes it is necessary to drive conditions from interactions with
the switch. For example, if a switch can be configured with either a blank password
or no password (no password prompt) then the text field for password is insufficient
to specify the correct configuration. Instead the script can use a regular expression
to expect either a password prompt or no prompt, and drive subsequent commands
from the result.
The following script works when any combination of Username and Password
prompt appear (and thus also works with both telnet and SSH without needing to
check which the user selected):
Initialization script:
expect -regex (Username:|Password:|>)
send -ifmatched Username: ${USERNAME}
expect -ifmatched Username: -regex (Password:|>)
send -ifmatched Password: ${PASSWORD}
expect -ifmatched Password: >
Reauthorization script:
send set dot1x port ${PORT} init
expect >
Exit script:
send exit
11-61

Advertisement

Table of Contents
loading

Table of Contents