Service Definitions
A service definition is a high-level, platform-independent template that defines a service that you want to let your subscribers use. You use the JunosE Software’s embedded macro language on your computer to create the macro file that defines the service. You copy and install the macro file on the E Series Broadband Services Routers, and then you can associate the service definition with subscribers to create their service sessions.
Service definitions gives you flexibility by enabling you to use:
- A single service definition to create a service for multiple subscribers.
- Parameterized service definitions to create variations of a service definition.
- Different service definitions to create multiple services for a single subscriber.
A service definition might use the following types of JunosE objects to define the characteristics and capabilities of the service you want to provide:
- Interface profiles—Specify a set of characteristics that can be dynamically assigned to IP interfaces. A service definition must use at least one interface profile.
- Policy lists—Specify policy actions for traffic traversing an interface.
- Classifier lists—Specify the criteria by which the router defines a packet flow.
- Rate-limit profiles—Specify a set of bandwidth attributes and associated actions that limit a classified packet flow or a source interface to a rate that is less than the physical rate of the port.
- QoS parameters—Specify attributes such as shaping rate, shared-shaping rate, assured rate, and scheduler weight for scheduler nodes and queues.
- QoS profiles—Specify queue, drop statistics gathering, and scheduler configuration for an interface hierarchy.
Creating Service Definitions
To create a service definition, you use the JunosE Software’s macro language to specify the parameters that define the desired service. A macro file can define only one service—however, the file can have multiple templates to define characteristics of the desired service. You create service definitions independent of the Service Manager commands and operations, which are performed on the E Series router.
For detailed information about the JunosE Software’s macro language, see the Command Line Interface chapter in JunosE System Basics Configuration Guide.
Figure 29 is an example of a service definition macro file that creates a tiered service. A tiered service typically provides set bandwidths for both inbound and outbound traffic for a subscriber. In this example, the input (inputBW) and output (outputBW) bandwidth values are parameterized. This example assumes that QoS profile triplePlayIP and QoS parameter maxSubscBW are configured. See Service Definition Examples for additional service definition examples.
Service Manager only tracks JunosE objects that are passed back in the env.setResult method when a service definition is executed. Table 139 describes the supported objects:
Table 139: JunosE Objects Tracked by Service Manager
Name | Requirement | Description |
|---|---|---|
input-stat-clacl | Optional |
|
secondary-input-stat-clacl | Optional |
|
output-stat-clacl | Optional |
|
activate-profile | Required |
|
deactivate-profile | Optional |
|
command-in-error | Optional |
|
command-error-status | Optional |
|
service-interface-type |
|
|
input-stat-epg | Optional |
|
output-stat-epg | Optional |
|
secondary-input-stat-epg | Optional |
|
Figure 29: Sample Service Definition Macro File

Managing Your Service Definitions
After you have created the macro file for your service definition, you can perform the following operations with the service definition macro file:
- Copy—You must copy the service definition from the local computer that you used to create the macro file to the router’s NVS card.
- Install—You must install the service definition before you can use it to create a service session. During installation, Service Manager precompiles the definition and extracts the definition file’s timestamp. Precompiling the service definition improves Service Manager performance. The timestamp enables the Service Manager application to track any modifications you might make while the definition is being used.
- Uninstall—You can uninstall a service definition file, for example, if you no longer want to use that definition. When you uninstall a service definition file, any existing service sessions that were activated using the original service definition continue to use the original definition until you deactivate the service session.
- Modify—You can update an existing service definition
file at any time. To update a service definition file:
- Use your text editor on your computer to make changes to the original service definition file.
- Copy the updated service definition file back to your router’s NVS—this overwrites the original file on the router.
- Install the new service definition file.
All new service sessions will be activated using the new service definition. Any existing service sessions that were activated using the original service definition continue to use the original definition until you deactivate the service session.
copy
- Use to copy a service definition macro file from your computer to the router’s NVS.
- Specify the directory containing the macro file you want to copy and the name you want to use for the file in NVS.
- Examplehost1#copy boston:/serviceDefs/triplePlay/tiered.mac tiered.mac
- There is no no version.
- See copy
service-management install
- Use to install or uninstall a service definition.
- You must include the .mac extension.
- During installation, Service Manager precompiles the service definition and extracts the definition file’s timestamp.
- After you install the service definition, you can use the definition to create service sessions for subscribers.
- To update an existing service definition, you make changes to the original macro file on your computer, copy the updated file to NVS, and install the updated file. All subsequent service sessions use the new service definition file. However, currently active service sessions continue to use the original definition file until the sessions are deactivated, then reactivated.
- Example 1—Installinghost1(config)#service-management install tiered.mac
- Example 2—Uninstallinghost1(config)#no service-management install tiered.mac
- Example 3—Updating! update the original macro file on the remote system
! copy the updated macro file to the routerhost1#copy boston:/serviceDefs/triplePlay/tiered.mac tiered.mac host1#configure terminal ! install the updated service definition on the router host1(config)#service-management install tiered.mac - Use the no version to uninstall a service definition.
- See service-management install
Hide Navigation Pane
Show Navigation Pane
SHA1