Smarts IP: What is the order that we resolve names in Smarts IP? How do we update this order?
search cancel

Smarts IP: What is the order that we resolve names in Smarts IP? How do we update this order?

book

Article ID: 331666

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:




This KB article explains the order in which we find a name for a device.

Environment

VMware Smart Assurance - SMARTS

Resolution

Smarts IP can attempt to resolve names with the following methods:

TM_USELOOPBACK
Resolve loopback IP address: If a loopback interface IP address can be resolved to a name, that name will be used to name the system. By default, the default loopback interface type number is 24, which represents the  software loopback  interface type.
For a discovered system that has multiple loopback addresses, the Name Resolution probe tries to resolve the lowest loopback address first. If that resolution fails, the Name Resolution probe tries to resolve each of the remaining loopback addresses.

TM_USESYSNAME
Resolve MIB-II sysName: If the sysName can be resolved to at least one IP address, and at least one of the resolved IP addresses resolves back to the sysName, the sysName will be used to name the system.

TM_USENONPRIVATEIP
Resolve non-private IP address: If at least one of the IP addresses is not a private IP address, the non-private IP address will be used to resolve the name. Once a name is resolved, the name will be used to name the system.

TM_USEPRIVATEIP
Resolve private IP address: If at least one of the IP addresses is a private IP address, the private IP address will be used to resolve the name. Once a name is resolved, the name will be used to name the system. By default, the private IPv4 address pattern is 10.*|192.168.*|172.<16-31>.*, which is defined as follows:
  • Any IP address with the value of 10 in the first octet (10.*.*.*).
  • Any IP address with a value of 172 in the first octet and a value between 16 and 31 in the second octet (172.<16-31>.*.*).
  • Any IP address with a value of 192 in the first octet and a value of 168 in the second octet (192.168.*.*).
TM_USEAGENTADDRESS
Resolve SNMP agent address: If an SNMP agent address can be resolved to a name, that name will be used to name the system.

The file called: name-resolver.conf located at : <BASEDIR>/smarts/conf/discovery/ contains the order in which we try these methods.

The default order is as follows:
 
1: First we try a loopback  to resolve to a name.
2: Then we move to the SNMP based  sysname.
3: Then we move to non privipaddress.
4: Then we move to private ip address.
5: Then we use the IP address.

Here's a example of a default list in the name-resolver.conf file:

AutoNameOrder 0 TM_USELOOPBACK
AutoNameOrder 1 TM_USESYSNAME
AutoNameOrder 2 TM_USENONPRIVATEIP
AutoNameOrder 3 TM_USEPRIVATEIP
AutoNameOrder 4 TM_USEAGENTADDRESS

To change the order use sm_edit:

1.) ./sm_edit conf/discovery/name-resolver.conf
2.) Change the AutoNameOrder numbers (0 through 4) to the order that you prefer.
3.) Save and close the file. The modified version of the name-resolver.conf file is saved to the BASEDIR/smarts/local/conf/discovery directory.
4.) Reload the file using the following command:
      ./sm_tpmgr -s <IP Manager instance name> -b <brokerName:port> --load-conf=name-resolver.conf
5.) During the next discovery or autodiscovery, name resolution will be updated.