Sample Transit Application

Files in This Example

Code in this topic is taken from the jnx-flow sample application. Once you create your development sandbox, the source code for this example is available in the following locations:

For information about creating your development sandbox, see "Creating Reference and Development Sandboxes" in the Installation Guide.

Transit applications receive packets in transit to their destination and then reinject, modify, or drop the packets as needed. The JUNOS software enables this functionality using the service set: a collection of rules or policies that can be applied to traffic coming to the Multiservices PIC. For basics about service sets and configuring them, see Service Set Configuration.

Before writing a transit application, you should be familiar with the concepts described in the JUNOS Services Interfaces Configuration Guide, which is available in the Juniper Networks documentation set.

Overview of Transit Application Operations

The following figure shows the operations of a typical transit application:


Lifecycle of a Transit Application

The following steps are the major operations an application performs to configure and use service sets.

  1. You write the configuration in a DDL file with the suffix .cnf.dd that you save in the sandbox/src/lib/ddl/input directory for your application. The configuration defines the policy rules, match conditions, and actions for each service set. (For details about configuring SDK applications, see the SDK CLI Configuration section of this documentation; for details about writing DDL, see Creating a User Interface with DDL and ODL.)

  2. The JUNOS spd daemon reads the configuration, stores it in the Routing Engine kernel, and creates a public blob that stores the mapping of service set name to a unique service set ID, and input and output next hops (if configured).

  3. Your application's management daemon on the Routing Engine parses the complete service set configuration to retrieve the information configured for the service set and the policy rules.

  4. Your application's management daemon on the Routing Engine calls SDK KCOM functions to retrieve the public blob with the mappings created by the spd daemon.

  5. The management daemon sends the policy rules and service set ID to your application's data daemon running on the PIC, using the SDK libconn library.

  6. The data daemon receives and sends packets according to the policy rules:

Contents of this Topic

This topic continues with the following sections:

2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:26:47 2010 for Juniper Networks Partner Solution Development Platform JUNOS SDK 10.2R1 by Doxygen 1.4.5