How to prepare and add Junos device to NSM using NSM auto discovery.
NSM can autodiscover devices on the network and add them to the managed device database. Some device preparation is necessary to accomplish this. The steps are included below. Note: The Autodiscover feature requires SSH v2 and SNMP access, which is specified in step 5.
Perform the following steps to add a Junos device to NSM using NSM auto discovery:
Log in to the JUNOS device.
Amnesiac (ttyu0) login: root Password: --- JUNOS 9.6R1.13 built 2009-08-01 09:23:09 UTC root@%
Enter the configuration CLI mode if needed:
root@% cli root>
Confirm device has the necessary configuration for connectivity: root-authentication, interface, routing, security zones. Security devices such as JSRX block all traffic by default, including management traffic.
Run the following command, and check the settings for the following set commands. For branch SRX devices, make sure the services required for NSM are opened for access (see bolded line below). In this example, the ge-0/0/0 interface is used to accept all inbound management traffic; you may be using a different interface for management.
root> show configuration | display set set version 9.6R1.13 set system root-authentication encrypted-password "$ABC123" set interfaces ge-0/0/0 unit 0 family inet address 10.85.49.149/24 set routing-options static route 0.0.0.0/0 next-hop 10.85.49.1
set security zones security-zone trust interfaces ge-0/0/0.0 host-inbound-traffic system-services all
Enter configuration mode:
root> edit Entering configuration mode [edit] root#
Configure netconf ssh AND SNMP community on the device. If the device is a cluster, configure the appropriate groups.
[edit] root# set system services netconf ssh [edit] root# set snmp community community1 root# set snmp location lab [edit] root# commit and-quit commit complete Exiting configuration mode root>
In NSM, select the Device Discovery Rules page:
Configure the Device Discovery Rule:
Accept the Update Topology Manager Preferences warning message:
Click "Run" icon to begin device discovery:
After devices are discovered, accept appropriate devices and click "Ok":
Device will receive NSM config through SSH connection and then will connect back to NSM over secure netconf tunnel. The configuration will look similar to the following:
root> show configuration | display set set version 9.6R1.13 set system root-authentication encrypted-password "$ABC123" set system services netconf ssh set system services outbound-ssh client nsm-10.85.34.46 device-id E65E54 set system services outbound-ssh client nsm-10.85.34.46 secret "$ABC123" set system services outbound-ssh client nsm-10.85.34.46 services netconf set system services outbound-ssh client nsm-10.85.34.46 10.85.34.46 port 7804 set system syslog file default-log-messages any any set system syslog file default-log-messages structured-data set interfaces ge-0/0/0 unit 0 family inet address 10.85.49.149/24 set snmp community community1 set routing-options static route 0.0.0.0/0 next-hop 10.85.49.1 set security zones security-zone trust interfaces ge-0/0/0.0 host-inbound-traffic system-services all root>
Click "Ok" to close Discovery completed message box and then close Device discovery progress box:
Device is now imported into NSM and is managed and in-sync.