Connecting to a device via a session
The Session connection method was added to provide support for the many and varied methods by which inter-connectivity can be achieved. Connections using this method can be achieved from one host device to any virtual device, blade, session or module.
To make use of this feature you need to setup two devices in CatTools. One that represents the parent device and one that represents the virtual device or session contained within it. Connection to the parent device is as normal. To connect to the virtual device you need to implement the following three fields on the device form.
- Host Address: used to execute any command that may be necessary to connect to the next device. Examples include:
Session slot 4 proc 1
- ConnectVia: set to the device you need to connect to first in order to establish the session.
- Method: set to
This feature is only available to specific devices:
Set up a connection via a session
The following example illustrates how this concept works: A Cisco 6509 has a firewall service module that you want to backup. The 6509 is CatOS and the firewall services module (FWSM) is Cisco IOS.
- Add a device called
My 6509as device type
- Set the necessary username and password information.
- Set the Host Address field to the IP of the device.
- Set the Connect Via field to
- Set the Method field, in this example, to
- Create a second device called
My FWSMas device type
- Set the Connect Via field option to
- Set the Method field to
- In the Host Address field, enter the command that is necessary to access the module. In this example set the field to
Session Slot 4 Proc 1.
- Configure login details on the Passwords tab.
- To backup the FWSM, create a backup activity and assign
My FWSMto it.
When CatTools runs the backup activity it identifies that to get to My FWSM it needs to go through My 6509. Therefore, CatTools logs into My 6509 first. Once logged in, CatTools issues your custom command to establish the connection and backs up the device as defined by the Cisco.Switch.IOS device type.
Disclaimer regarding connecting via a session
Normal communication between CatTools and the connected device is a process of sending commands and receiving known responses. In this instance, we know what responses to expect because we know the OS of the device we are connected to.
However, the Session connection method can be used to connect from one device to another. In most cases these parent-child devices are on the same operating system but in some cases they wont be. For that reason the logic behind this particular connection routine is different versus all other devices. It works in reverse.
As we do not know what a login prompt, if one even exists, might look like on the second device we can not use that prompt as a known good response. Instead we look for the known bad responses of the first device at the time the connection command is issued. If anything other than a known error is received it is assumed that the response is the banner or login or prompt from the second device. At this point control is handed over to the script of the device-type of the second device to process authentication.
It is possible that the connection is established and an error message is returned that is not trapped for. In this scenario CatTools thinks that it is on the second device and starts performing the activity as scheduled. If the operating systems are similar enough the commands may still be valid and the instructions are processed on the wrong device.
For this reason, SolarWinds strongly recommends that you thoroughly test all Session connections before putting them into production and that you monitor them closely.