15 Replies Latest reply on Feb 22, 2010 4:15 AM by Questionario

    I need interfaces to capture the IP address assigned to them.

    smartd

      I would like any TCP addresses assigned to an interface to be captured during discovery, and there be a detailed page resource that would show the interface and assigned IPs. 

      This is different that IPAM, which I also own, that gives devices assigned to IP addresses. 

      Does this exist?  Its hard to believe that it doesn't.

       

      -=Dan=-

        • Re: I need interfaces to capture the IP address assigned to them.
          lchance

          Yep - I agree - it's hard to believe it doesn't exist.

          I have to do it using the Universal Device Poller and create it as a Table in the Node Details View. It's not pretty but that does work. Have you tried using UnDP yourself?

            • Re: I need interfaces to capture the IP address assigned to them.
              Congo

              lchance,

              What OID are you using for your UnDP?

              • Re: I need interfaces to capture the IP address assigned to them.
                smartd

                Ok, I see that OID 1.3.6.1.2.1.4.20 gives the table of ipAddresses, but uses the interface index number.  What's needed is to lookup the interface name in 1.3.6.1.2.1.2.2.  Is there anyway in the existing resources to see the interface index number?  How did you work out getting interface names?

                -=Dan=-

                  • Re: I need interfaces to capture the IP address assigned to them.
                    lchance

                    As for interface names i used the ifDescr.

                    In the Node Details view UnDP table is slightly staggered but it works out seeing those with IP addresses.

                      • Re: I need interfaces to capture the IP address assigned to them.
                        smartd

                        I've got a single view that shows the IP address and the Interface Number, then another table that shows Interface number, and name.  I'd like to do a JOIN on the two tables.

                        -=Dan=-

                          • Re: I need interfaces to capture the IP address assigned to them.

                            I got that working.   I will have to clean up how i did it and I will post in the content exchange.  It took a custom poller + custom property and a sql update stament to get this to work.    When I finish my cleanup I will update this post.

                             

                              • Re: I need interfaces to capture the IP address assigned to them.
                                smartd

                                I was looking for something at the Node Details level.  What I have now looks like:

                                • Re: I need interfaces to capture the IP address assigned to them.
                                  smartd

                                  Not to dismiss your Interface IP details resource.  Looks awesome.  Would love to see the code for it.

                                  -=Dan=-

                                    • Re: I need interfaces to capture the IP address assigned to them.

                                      So something like this on the Node page?  The SQL query I built to add IP address to custom properity will let you build report that will display that info. 

                                      The SQL query is simple.  You will need to replace [ChangeMeToCustomPropertyName] and [ChangeMeToCustomPollerName] to the correct values. What this will do is add the Ip address to a Custom property in the interface table.

                                      UPDATE Interfaces
                                      SET [ChangeMeToCustomPropertyName]=s.RowID
                                      From CustomPollerAssignment a JOIN CustomPollerStatus s ON a.CustomPollerAssignmentID=s.CustomPollerAssignmentID
                                      JOIN Interfaces i ON a.NodeID=i.NodeID
                                      Where a.AssignmentName LIKE '%[ChangeMeToCustomPollerName]%'  AND s.Status = i.InterfaceIndex

                                      After you have done that you will need to create report.  You will need NodeID and any other field you want to see.  Hide the NodeID in the report.  After you add report to the page filter by NodeID=${NodeID} that should limit the report to current node.

                                        • Re: I need interfaces to capture the IP address assigned to them.
                                          Questionario

                                          is this a report?

                                          could you share the pollers and the actual report?

                                            • Re: I need interfaces to capture the IP address assigned to them.

                                              Yes it is a report but it is not as simple as add poller and report. What I did was add Custom Property to Interfaces called IntIpAddress.  I setup poller to get the Raw Value non-historic data from 1.3.6.1.2.1.4.20.1.2. 

                                              <?xml version="1.0" encoding="utf-8"?>
                                              <CustomPollers version="9.0">
                                                <CustomPoller UniqueName="ipAdEntIfIndex" Description="unknown" OID="1.3.6.1.2.1.4.20.1.2" MIB="IP-MIB:ipAdEntIfIndex" SNMPGetType="GetSubTree" NetObjectPrefix="N" GroupName="InterfaceIPAddress" PollerType="S" Parser="None" IncludeHistory="False" Unit="" TimeUnitId="0" TimeUnitQuantity="0" DefaultDisplayTimeUnitId="0" Formula="" LabelType="Interface" LabelDetail="">
                                                  <Enumerations />
                                                </CustomPoller>
                                              </CustomPollers>

                                              (Put that in a UnDP file for poller)

                                              Now after that poller runs you will need to update the database to add the Ip address to the interface table.  This is the query I used. (use at your own risk)


                                              UPDATE Interfaces
                                              SET IntIpAddress=s.RowID
                                              From CustomPollerAssignment a JOIN CustomPollerStatus s ON a.CustomPollerAssignmentID=s.CustomPollerAssignmentID
                                              JOIN Interfaces i ON a.NodeID=i.NodeID
                                              Where a.AssignmentName LIKE '%ipAdEnt%'  AND s.Status = i.InterfaceIndex

                                              Now that the Ip address is in the Interface table it is easy to setup report to get that info. 

                                              Interfaces.NodeID AS NodeID, Interfaces.InterfaceID AS InterfaceID, Interfaces.InterfaceIndex AS Interface_Index, Interfaces.InterfaceName AS Interface_Name, Interfaces.IntIpAddress AS IntIpAddress
                                               FROM
                                              Interfaces
                                              " TopX="All" TopXCount="10" TopXPercent="10" Orientation="Landscape" CookedData="TRUE" Web="TRUE" ShowFolders=""><QueryBuilder><Fields><QUERY><KIND>2</KIND><COMPLEX><TAG></TAG><CONNECTIVE>1</CONNECTIVE><CHECKED>1</CHECKED><SIMPLE><TAG></TAG><ALIAS></ALIAS><ADVANCED>0</ADVANCED><COMPARISON>0</COMPARISON><FUNCTION>0</FUNCTION><SORT>0</SORT><CHECKED>1</CHECKED><LEFTSIDEKIND>2</LEFTSIDEKIND><RIGHTSIDEKIND>1</RIGHTSIDEKIND><COMPARISONATTRIBUTES></COMPARISONATTRIBUTES><FUNCTIONATTRIBUTES></FUNCTIONATTRIBUTES><LEFTFIELDPATH>Interfaces.Interface Details.Node ID</LEFTFIELDPATH><RIGHTFIELDPATH></RIGHTFIELDPATH><LEFTVALUETYPE>0</LEFTVALUETYPE><LEFTVALUE></LEFTVALUE><LEFTCAPTION>Node ID</LEFTCAPTION><RIGHTVALUETYPE>3</RIGHTVALUETYPE><RIGHTVALUE>0</RIGHTVALUE><RIGHTCAPTION>0</RIGHTCAPTION></SIMPLE><SIMPLE><TAG></TAG><ALIAS></ALIAS><ADVANCED>0</ADVANCED><COMPARISON>0</COMPARISON><FUNCTION>0</FUNCTION><SORT>0</SORT><CHECKED>1</CHECKED><LEFTSIDEKIND>2</LEFTSIDEKIND><RIGHTSIDEKIND>1</RIGHTSIDEKIND><COMPARISONATTRIBUTES></COMPARISONATTRIBUTES><FUNCTIONATTRIBUTES></FUNCTIONATTRIBUTES><LEFTFIELDPATH>Interfaces.Interface Details.Interface ID</LEFTFIELDPATH><RIGHTFIELDPATH></RIGHTFIELDPATH><LEFTVALUETYPE>0</LEFTVALUETYPE><LEFTVALUE></LEFTVALUE><LEFTCAPTION>Interface ID</LEFTCAPTION><RIGHTVALUETYPE>3</RIGHTVALUETYPE><RIGHTVALUE>0</RIGHTVALUE><RIGHTCAPTION>0</RIGHTCAPTION></SIMPLE><SIMPLE><TAG></TAG><ALIAS></ALIAS><ADVANCED>0</ADVANCED><COMPARISON>0</COMPARISON><FUNCTION>0</FUNCTION><SORT>0</SORT><CHECKED>1</CHECKED><LEFTSIDEKIND>2</LEFTSIDEKIND><RIGHTSIDEKIND>1</RIGHTSIDEKIND><COMPARISONATTRIBUTES></COMPARISONATTRIBUTES><FUNCTIONATTRIBUTES></FUNCTIONATTRIBUTES><LEFTFIELDPATH>Interfaces.Interface Details.Interface Index</LEFTFIELDPATH><RIGHTFIELDPATH></RIGHTFIELDPATH><LEFTVALUETYPE>0</LEFTVALUETYPE><LEFTVALUE></LEFTVALUE><LEFTCAPTION>Interface Index</LEFTCAPTION><RIGHTVALUETYPE>3</RIGHTVALUETYPE><RIGHTVALUE>0</RIGHTVALUE><RIGHTCAPTION>0</RIGHTCAPTION></SIMPLE><SIMPLE><TAG></TAG><ALIAS></ALIAS><ADVANCED>0</ADVANCED><COMPARISON>0</COMPARISON><FUNCTION>0</FUNCTION><SORT>0</SORT><CHECKED>1</CHECKED><LEFTSIDEKIND>2</LEFTSIDEKIND><RIGHTSIDEKIND>1</RIGHTSIDEKIND><COMPARISONATTRIBUTES></COMPARISONATTRIBUTES><FUNCTIONATTRIBUTES></FUNCTIONATTRIBUTES><LEFTFIELDPATH>Interfaces.Interface Details.Interface Name</LEFTFIELDPATH><RIGHTFIELDPATH></RIGHTFIELDPATH><LEFTVALUETYPE>0</LEFTVALUETYPE><LEFTVALUE></LEFTVALUE><LEFTCAPTION>Interface Name</LEFTCAPTION><RIGHTVALUETYPE>129</RIGHTVALUETYPE><RIGHTVALUE></RIGHTVALUE><RIGHTCAPTION></RIGHTCAPTION></SIMPLE><SIMPLE><TAG></TAG><ALIAS></ALIAS><ADVANCED>0</ADVANCED><COMPARISON>0</COMPARISON><FUNCTION>0</FUNCTION><SORT>0</SORT><CHECKED>1</CHECKED><LEFTSIDEKIND>2</LEFTSIDEKIND><RIGHTSIDEKIND>1</RIGHTSIDEKIND><COMPARISONATTRIBUTES></COMPARISONATTRIBUTES><FUNCTIONATTRIBUTES></FUNCTIONATTRIBUTES><LEFTFIELDPATH>Interfaces.Custom Properties.IntIpAddress</LEFTFIELDPATH><RIGHTFIELDPATH></RIGHTFIELDPATH><LEFTVALUETYPE>0</LEFTVALUETYPE><LEFTVALUE></LEFTVALUE><LEFTCAPTION>IntIpAddress</LEFTCAPTION><RIGHTVALUETYPE>129</RIGHTVALUETYPE><RIGHTVALUE></RIGHTVALUE><RIGHTCAPTION></RIGHTCAPTION></SIMPLE></COMPLEX></QUERY>
                                                </Fields><Filter><QUERY><KIND>1</KIND><COMPLEX><TAG></TAG><CONNECTIVE>1</CONNECTIVE><CHECKED>1</CHECKED><SIMPLE><TAG></TAG><ALIAS></ALIAS><ADVANCED>0</ADVANCED><COMPARISON>0</COMPARISON><FUNCTION>0</FUNCTION><SORT>0</SORT><CHECKED>0</CHECKED><LEFTSIDEKIND>2</LEFTSIDEKIND><RIGHTSIDEKIND>1</RIGHTSIDEKIND><COMPARISONATTRIBUTES></COMPARISONATTRIBUTES><FUNCTIONATTRIBUTES></FUNCTIONATTRIBUTES><LEFTFIELDPATH>Network Nodes.Node Details.Node ID</LEFTFIELDPATH><RIGHTFIELDPATH></RIGHTFIELDPATH><LEFTVALUETYPE>0</LEFTVALUETYPE><LEFTVALUE></LEFTVALUE><LEFTCAPTION>Node ID</LEFTCAPTION><RIGHTVALUETYPE>3</RIGHTVALUETYPE><RIGHTVALUE>0</RIGHTVALUE><RIGHTCAPTION>0</RIGHTCAPTION></SIMPLE></COMPLEX></QUERY>
                                                </Filter></QueryBuilder><LayoutGroups></LayoutGroups><Fields><Field Name="NodeID" Header="Node ID" Range="Positive" Parser="None" Format="" Alignment="Center" Width="0" Units="" Hidden="True" WebURL="/Orion/View.aspx?View=NodeDetails&amp;NetObject=N:${NodeID}"></Field><Field Name="InterfaceID" Header="Interface ID" Range="Positive" Parser="None" Format="" Alignment="Center" Width="0" Units="" Hidden="True" WebURL=""></Field><Field Name="Interface_Index" Header="Interface Index" Range="ALL" Parser="None" Format="" Alignment="Center" Width="0" Units="" Hidden="False" WebURL=""></Field><Field Name="IntIpAddress" Header="Interface Ip Address" Range="ALL" Parser="None" Format="0" Alignment="Left" Width="0" Units="" Hidden="False" WebURL=""></Field><Field Name="Interface_Name" Header="Interface Name" Range="ALL" Parser="None" Format="" Alignment="Left" Width="0" Units="" Hidden="False" WebURL="/Orion/View.aspx?View=InterfaceDetails&amp;NetObject=I:${InterfaceID}"></Field></Fields></Report>

                                              Add this report to the node page and add the filter NodeID=${NodeID}.  That should be all you neeed. 

                                • Re: I need interfaces to capture the IP address assigned to them.
                                  ecklerwr1

                                  I've been puzzled for a while now over this.... how could you NOT include the IP address of an interface on the details page!  Is there ne real technical reason why this is???  I end up having to log into routers get the IP's when I need them quickly because NPM interface details doesn't show it... geeze.

                                • Re: I need interfaces to capture the IP address assigned to them.
                                  netlog

                                  ip flow ingress infer-fields

                                  If the Source IP address and Destination IP address are not seen in IP Flow
                                  * The packets are blocked by an ACL.
                                  * The packets are being process switched.
                                  * Multicast traffic
                                  * Packets destined for the router
                                  * Tunnels (IPIP, GRE, IPSEC, L2TP) & WCCP
                                  * Static route to null0
                                  * DstIf is NULL when the traffic is dropped because of CAR.