Is there a way to run RSW commands from the CPM Unix level?

book

Article ID: 167961

calendar_today

Updated On:

Products

XOS

Issue/Introduction

The article describes a way how to access RSW and enter RSW commands from the CPM Unix prompt.The article describes a way how to access RSW and enter RSW commands from the CPM Unix prompt.

Cause

Goal: Accessing RSW from the CPM Unix prompt on purpose of gathering troubleshooting information.

Resolution

It is possible to use telnet to connect to to RSW daemon on the master VAP and execute RSW commands in a single line from the CPM Unix shell.

Here is an example how to collect OSPF routes from the master VAP called vap_1 (some output is removed for brevity). The "sleep" command is required to add a pause allowing the previous commands to finish before the connection is closed.

CBS# unix su
Password:
[[email protected] admin]# (echo admin; echo enable; echo admin; echo show ip ospf route; sleep 2; echo quit) | telnet vap_1 2604 
Trying 1.1.6.108...
Connected to vap_1.
Escape character is '^]'.
 
ZebOS version 7.8.3 IPIRouter 03/07/13 22:42:29
 
User Access Verification
 
Password:
ospfd>enable
Password:
ospfd#show ip ospf route
 
OSPF process 1:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2

... <removed> ...

ospfd#quit
Connection closed by foreign host.
[[email protected] admin]# 
 

You can connect to BGP daemon on TCP port 2605 or NSM on the port 2601 in a similar manner.  

As with any Unix commands, be careful that you've typed each command correctly to avoid unintended effects.

Workaround

N/A