[Contents] [Prev] [Next] [Index] [Report an Error]

Connecting to the JUNOScript Server

For a client application to connect to the JUNOScript server and open a session, you must first satisfy the prerequisites described in Prerequisites for Establishing a Connection.

When the prerequisites are satisfied, an application written in Perl can most efficiently establish a connection and open a session by using the JUNOScript Perl module provided by Juniper Networks. For more information, see Writing Perl Client Applications.

A client application that does not use the JUNOScript Perl module connects to the JUNOScript server by opening a socket or other communications channel to the JUNOScript server machine (routing platform), invoking one of the remote-connection routines appropriate for the programming language and access protocol that the application uses.

What the client application does next depends on which access protocol it is using:

Connecting to the JUNOScript Server from the CLI

The JUNOScript and JUNOS XML APIs are primarily intended for use by client applications; however, for testing you can establish an interactive JUNOScript session and type commands in a shell window. To connect to the JUNOScript server from CLI operational mode, issue the junoscript interactive command (the interactive option causes the JUNOScript server to echo what you type):

user@host> junoscript interactive

To begin a JUNOScript session over the connection, emit the initialization PI and tag that are described in Emitting the Initialization PI and Tag. You can then type sequences of tag elements that represent operational and configuration operations, which are described in Requesting Information, Changing Configuration Information, and Committing a Configuration. To eliminate typing errors, save complete tag element sequences in a file and use a cut-and-paste utility to copy the sequences to the shell window.

Note: When you close the connection to the JUNOScript server (for example, by emitting the <request-end-session/> and </junoscript> tags), the routing platform completely closes your connection instead of returning you to the CLI operational mode prompt. For more information about ending a JUNOScript session, see Ending a JUNOScript Session and Closing the Connection.


[Contents] [Prev] [Next] [Index] [Report an Error]