Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EOL/EOE] Mass Service and Address object import for NSM



Article ID: KB13551 KB Last Updated: 25 Oct 2020Version: 3.0

Note: A product listed in this article has either reached hardware End of Life (EOL) OR software End of Engineering (EOE).  Refer to End of Life Products & Milestones for the EOL, EOE, and End of Support (EOS) dates.

This article describes how to import multiple objects into NSM using a modeled device.  It includes the following:

  • Address object Import
  • Service object Import
Overview of procedures:


  1. Create modeled NS-25
  2. Assign policy with one rule to modeled NS-25
  3. Export config of modeled NS-25
  4. Strip out all non-essential info out of exported file
  5. Add address objects into file
  6. Import file back into modeled NS-25 bringing address objects with it.

Note:   A modeled NS-25 will be referred to as NS-25 'Object Buffer' in this article.


Here is a Service object:

: ("Test Service new"
			:members (
				: (
					:check_icmp (not_icmp
						:not_icmp (
							:protocol (17)
							:src_port (
								:port_types (range)
								:low (1)
								:high (65)
							:dst_port (
								:port_types (range)
								:low (1)
								:high (65)
			:timeout (default
				:default (null)


  1. First, model a device:

  2. Then, create a policy and assign it to the modeled Device:

  3. Add Test address to the Policy:

  4. Export Device Config to a file.  We are going to name it
  5. Strip unneeded file contents so that it looks like the file below.  Make sure to leave the address object or service object you are using as a template to copy and paste more objects.

  6. Copy address object entry as needed to create more objects.
  7. Here is an Address object:
    : ("Test Object New"
    			:zone (trust)
    			:comment ("Object to export for template")
    			:address (subnet
    				:subnet (
    					:ip ("")
    					:netmask (32)
    					:wildcard-mask ("")
    					:enable-wildcard-mask (false)

  8. Import config into NSM:

  9. Check your object list for your new objects to appear.

Here is an example file that contains a test service and a test address object to be imported into the modeled device used in this KB:
Modification History:
2020-10-25: Removed EOS product.
2020-10-18: Tagged article for EOL/EOE.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search