SD-WAN

 View Only
last person joined: 13 days ago 

Ask questions and share experiences with SD-WAN and Session Smart Router (formerly 128T).

How-To: Run Router Commands From Conductor 

05-23-2018 02:28

This guide provides a generic example of how to leverage the built-in salt commands in the 128T, along with a specific set of commands to download all 128T router logs. It's important to note that the 128T router must be fully managed via the automated installer/provisioner (salt) for this functionality.

Generic Sample Scenarios
From the shell of the conductor, execute the following commands to run any linux command directly on the 128T router:
 
  • Get the asset/minion ID by viewing accepted salt keys:
$ sudo t128-salt-key
Accepted Keys:
S242344X7201033
Denied Keys:
Unaccepted Keys:
Rejected Keys:
  • Using the minion ID above, issue a linux command:
$ sudo t128-salt 'S242344X7201033' cmd.run 'ip a'
S242344X7201033:
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
        link/ether 0c:c4:7a:9f:88:0c brd ff:ff:ff:ff:ff:ff
    3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
        link/ether 0c:c4:7a:9f:88:0d brd ff:ff:ff:ff:ff:ff
    4: mgmt1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
        link/ether 0c:c4:7a:9f:88:0e brd ff:ff:ff:ff:ff:ff
        inet 172.25.128.63/24 brd 172.25.128.255 scope global mgmt1
           valid_lft forever preferred_lft forever
        inet6 fe80::ec4:7aff:fe9f:880e/64 scope link
           valid_lft forever preferred_lft forever

Scenario to Create 128T Router Logs and Upload to 128T Conductor

Configure the salt master (conductor) to allow receiving files (this process only needs to be done initially, if not configured previously):
 
  • Edit the following config file on the salt master running on the 128T conductor:

$ sudo vi /etc/128technology/salt/master
...
# get presence change events for minions
presence_events: True

file_recv: True
  • Restart 128T on the conductor:
$ sudo systemctl restart 128T
  • Get the salt key:
$ sudo t128-salt-key
Accepted Keys:
S242344X7201033
Denied Keys:
Unaccepted Keys:
Rejected Keys:
  • Execute the following command on the conductor to restart the salt minion on the remote router:
 
Note: Salt will error as shown below, but the process to restart the salt minion should complete successfully.
$ sudo t128-salt 'S242344X7201033' cmd.run 'sudo systemctl restart salt-minion'
S242344X7201033:
    Minion did not return. [No response]

Execute the following commands now to create and send the 128T router logs:
 
  • Execute the following command to create the log tar ball on the remotely managed router:
 
Note: Salt could error, but the process to create compress and gzip all logs should complete successfully.
$ sudo t128-salt 'S242344X7201033' cmd.run 'su - admin -c "save tech-support-info"'
S242344X7201033:
    Starting the PCLI...
    Retrieving Tech Support Info...
    /var/log/128technology/tech-support-info.tar.gz
  • Send the logs files to the salt master (conductor):
 
Note: Salt could error, and in this case you will have to run the command again as the file will be partially downloaded.
$ sudo t128-salt 'S242344X7201033' cp.push '/var/log/128technology/tech-support-info.tar.gz'
S242344X7201033:
Starting the PCLI...
Retrieving Tech Support Info...
/var/log/128technology/tech-support-info.tar.gz
  • The single compressed log file will now be in ​/var/cache/salt/master/minions/S242344X7201033/files/.
$ ls /var/cache/salt/master/minions/S242344X7201033/files/var/log/128technology/
tech-support-info.tar.gz

#Conductor
#router

Statistics
0 Favorited
3 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.