This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Naming the interfaces using command line

I have quite a few FC interfaces on some Brocade FC switches, but since NPM is unable to pull the alias information or portname information, the information is not being displayed.

So, I would like to manually name these interfaces to reflect the aliases.

Is there a way in NPM to name each interface using a command line, instead of manually naming each and every interface via GUI.

Thanks!

  • How about sql script, would that be an option for you?

  • you can do that in SQL easy enough, but I do not think you can in CMD line

    ***DISCLAIMER*** If the InterfaceAlias is pulled from a SNMP query, it will probably overwrite anything you do here. I have not tested this in production so I am not 100% sure it will work. It will absolutely update the database, but I cannot guarantee it will not be overwritten in the future when the device and interfaces are rediscovered.

    Here's how to do it in SQL:

    First, setup a stored PROC to Update your InterfaceAlias based on the InterfaceID

    CREATE PROC

        CUSTOM_UpdateInterfaceAlias

    @InterfaceAlias nvarchar (50),@InterfaceID nvarchar (50)

    AS

    Update 

        Interfaces

    Set 

        InterfaceAlias = @InterfaceAlias

    Where 

        InterfaceID = @InterfaceID

    Next, query your current devices for Brocade devices, and find the InterfaceID of the interfaces you are interested in:

    SELECT

        Nodes.NodeID,

        Nodes.Caption AS HostName,

        Interfaces.InterfaceID,

        Interfaces.Caption AS Interface,

        Interfaces.InterfaceAlias

      

    FROM

        Nodes

      

    LEFT JOIN

        Interfaces

      

    ON

        Nodes.NodeID = Interfaces.NodeID

    WHERE

        Nodes.Vendor LIKE '%Brocade%'

    ORDER BY Nodes.Caption  

    Then you could run this:

    EXEC CUSTOM_UpdateInterfaceAlias 'THIS INTERFACE IS AWESOME','12345'

    Syntax:

    EXEC CUSTOM_UpdateInterfaceAlias '<place your desired alias here>','<place the interfaceID here>'

    emoticons_happy.png