Name

nnmconnedit.sh — make corrections to the L2 (layer 2) connection topology. Users can add and delete connections.

SYNOPSIS

nnmconnedit.sh -f corrections file -t [add|delete] [-help] [-u <username> -p <password>] [-jndiHost <hostName> Default: localhost] [-jndiPort <port> Default: 1099]

DESCRIPTION

Due to a variety of factors, NNMi L2 connection topology discovery can contain inaccuracies. The nnmconnedit.sh script provides a way for the user to add connections to or delete connections from NNMi. The administrator creates the corrections file and must follow the following structured XML format:

<connectionedits>
    <connection>
        <operation>add or delete</operation>
        <node>name, long name or IP address</node>
        <interface>ifName, ifAlias, ifDescr or ifIndex</interface>
        <node>name, long name or IP address</node>
        <interface>ifName, ifAlias, ifDescr or ifIndex</interface>
    </connection>
</connectionedits>
         

Where:

operation identifies whether the connection is to be added or deleted.

node is identified by its short name, long name (DNS name) or IP address.

interface is identified in order by ifIndex, ifName, ifDescr, or ifAlias. This value must be unique. Note that using ifIndex is discouraged due to the interface renumbering feature supported by some devices. For non-SNMP nodes, ifAlias or ifDescr are recommended.

For each connection element, there must be at least two nodes and two interfaces. The number of nodes and interfaces must be equal. Each node and interface pair is known as an endpoint, so a single connection element can have two or more endpoints specified. Multiple connection elements are permitted within a corrections file.

When adding a connection, each endpoint will be removed from any existing connection of which it may be a member, then added to the new connection. If there are more than two endpoints specified in the connection element, the connection will appear on maps as a shared-media connection symbol. If the connection element specifies a connection which already exists in the NNMi database, then nothing will be changed.

When deleting a connection, nothing will be changed unless a connection with the same set of endpoints already exists in the NNMi database. In that case, all of the specified endpoints will be left in a disconnected state. If network devices are reporting a connection, deleting that connection will only be temporary. In this case, the deleted connection reappears in NNMi the next time NNMi discovers the nodes involved in the connection.

Parameters

The nnmconnedit.sh script recognizes the following parameters and options:

-f corrections file

Specifies the name of the file that contains the formatted connection add and delete directives.

-t [add | delete]

Generates a template file that can be used to create a corrections file. Specifying add will create an add operation template while specifying delete will generate a delete operation template.

-u <username>

Supply the NNMi administrator username to run the script.

-p <password>

Supply the NNMi administrator password to run the script.

-jndiHost <serverName>

The server JNDI host; default is localhost.

-jndiPort <port>

The server JNDI port; default is 1099.

-help

This option displays the script usage information.

EXAMPLES

Suppose that NNMi connection discovery was unable to find the L2 connection between two switches manufactured by different vendors. To remedy this, go to each device and get the node names and interface names that need to be connected. Next, create the add template file, mychg.xml, passing the -t option of the nnmconnedit.sh script. Next, edit the file, filling in the node and interface information. Save your changes in the mychg.xml file.

The following is an example of the mychg.xml (add template) file:

<connectionedits>
    <connection>
        <operation>add</operation>
        <node>nodeA.x.y.z</node>
        <interface>fa/09</interface>
        <node>nodeB.x.y.z</node>
        <interface>fa/05</interface>
    </connection>
</connectionedits>
         

Finally, run the nnmconnedit.sh script, passing the mychg.xml file with the -f option.

nnmconnedit.sh -f mychg.xml

Suppose that NNMi connection discovery creates an L2 connection where none should exist. To remedy this, get the node names and interfaces involved in the incorrect connection. Then create the mychg.xml (delete template) file, passing the -t option of the nnmconnedit.sh script. Next, edit the file by filling in the node and interface information. Save your changes in the mychg.xml file.

The following is an example of the mychg.xml (delete template) file:

<connectionedits>
    <connection>
        <operation>delete</operation>
        <node>nodeA.x.y.z</node>
        <interface>fa/09</interface>
        <node>nodeB.x.y.z</node>
        <interface>fa/05</interface>
    </connection>
</connectionedits>
         

Finally, run the nnmconnedit.sh script, passing the mychg.xml file with the -f option.

nnmconnedit.sh -u username -p password -f mychg.xml

AUTHOR

nnmconnedit.sh was developed by Hewlett Packard Enterprise.

FILES

None

See Also

None

Return to Reference Pages Index