No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ---The ifindex carried in the netstream flow do not match the ifindex of the interface

Publication Date:  2016-08-23 Views:  201 Downloads:  0
Issue Description

Scenario :

As shown in the below figure, Department 1 and Department 2 connects to the Internet through a NE20E router. The administrator  wants to monitor communication between departments and the Internet by netstream.The router is configured to collect statistics on the g1/0/0 interface of the router and to export them to the netstream server but the netstream server displays the traffic flows as being received from a different interface.






On  the  Netstream server we can see in the input column( which  mentions the interface on which the traffic flow was received )that traffic was received on interface index 10 which does not match the ifindex of interface g1/0/0.

 

Netstream collected information :




Ifindex of the interface:


display interface GigabitEthernet1/0/0

GigabitEthernet1/0/0 current state : UP (ifindex: 7)

 

Configuration(NE20E V800R005C01SPC200):


#
 sysname Router
#

ip netstream export template timeout-rate 10

ip netstream export source 10.1.2.1

ip netstream export host 10.1.2.2 2055

#

interface GigabitEthernet1/0/0

 undo shutdown

 ip address 10.1.1.1 255.255.255.0

 ip netstream inbound

 ip netstream outbound

 ip netstream sampler fix-packets 100 inbound

 ip netstream sampler fix-packets 100 outbound

 undo dcn


Solution

The ifindex allocated by the software version is different from the interface index allocated by Netstream. By default, the interface indexes carried in the output NetStream flows are the indexes allocated by Netstream and not the ifindexes allocated by the VRP system.

 

In this situation, we have the following options:


1. Use the ip netstream export index-switch 32  command in the system view to set the router to carry the ifindex assigned by the VRP in the netstream flows.


Example

# Switch the interface index from a 16-bit value to a 32-bit value.

<HUAWEI> system-view
[~HUAWEI] ip netstream export index-switch 32

 

2.Use the below MIB table to check the interface index correlation between the indexes assigned by the VRP and Netstream.


hwNetStreamIfIndexTable

This table stores the relationship between the 16-bit interface index allocated by the NetStream and the 32-bit interface index allocated by the VRP system.

The indexes of this table is hwNetStream16BitIndex.

The OID prefix of this table is 1.3.6.1.4.1.2011.5.25.110.1.2.1.

Object

Syntax

Max Access

Description

Implemented Specifications

hwNetStream16BitIndex[1]

Integer32 (0..65525)

Read-only

The value of this object identifies the 16-bit interface index allocated by the NetStream.

This object is implemented as defined in the corresponding MIB files.

hwifNet32BitIndex[2]

Integer32

Read-only

The value of this object identifies the 32-bit interface index allocated by the VRP system.

This object is implemented as defined in the corresponding MIB files.

END