![]() |
Table Of Contents
OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
Prerequisites for Using the SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
Information About the OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
Benefits of Choosing to Identify Interfaces by the SNMP MIB-II ifIndex Value
How OSPFv2 and OSPFv3 Use the SNMP MIB-II ifIndex Value
How to Configure the SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
Using SNMP MIB-II ifIndex Numbers and Verifying Configuration
Configuring the SNMP ifIndex Value for Interface ID for OSPFv2: Example
Configuring the SNMP ifIndex Value for Interface ID for OSPFv3: Example
Feature Information for OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
First Published: February 27, 2006Last Updated: February 19, 2007This document describes the configuration command that allows you to use either the current interface number or the SNMP MIB-II interface index (ifIndex) value for the interface ID in OSPFv2 and OSPFv3 data fields. The advantage to using the SNMP MIB-II ifIndex value is that this number corresponds to the number that the user will see reported by SNMP.
Finding Feature Information in This Module
Your Cisco IOS software release may not support all of the features documented in this module. To reach links to specific feature documentation in this module and to see a list of the releases in which each feature is supported, use the "Feature Information for OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields" section.
Finding Support Information for Platforms and Cisco IOS and Catalyst OS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•
Prerequisites for Using the SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
•
Information About the OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
•
How to Configure the SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
•
Feature Information for OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
Prerequisites for Using the SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
OSPF must be configured on the router.
Information About the OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
Before choosing to switch from the current interface numbers to the SNMP MIB-II interface ID numbers, you should understand the following concepts:
•
Benefits of Choosing to Identify Interfaces by the SNMP MIB-II ifIndex Value
•
How OSPFv2 and OSPFv3 Use the SNMP MIB-II ifIndex Value
Benefits of Choosing to Identify Interfaces by the SNMP MIB-II ifIndex Value
If you use Simple Network Management Protocol (SNMP) for your OSPF network, configuring the OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields feature can be beneficial for the following reasons:
•
Using the SNMP MIB-II ifIndex (interface index) identification numbers to identify OSPF interfaces makes it easier for network administrators to identify interfaces because the numbers will correspond to the numbers that they will see reported by SNMP.
•
When examining link-state advertisements (LSAs), the value used in fields that have the interface ID will be the same as the value that is reported by SNMP.
•
When looking at the output of the show ipv6 ospf interface command, the interface ID number will have the same value that is reported by SNMP.
•
Using the SNMP MIB-II IfIndex is also suggested, but not required, by the OSPF RFC 2328 for OSPFv2 and the RFC 2740 for OSPFv3.
How OSPFv2 and OSPFv3 Use the SNMP MIB-II ifIndex Value
The user chooses for OSPF interfaces to use the SNMP MIB-II ifIndex number by entering the interface-id snmp-if-index command for a specific OSPF process. If an interface under the specific OSPF process does not have an SNMP ifIndex number, OSPF will not be enabled on that interface.
For OSPFv2, the ifIndex number is used for the Link Data field in the Router LSA for unnumbered point-to-point interfaces and sham links. When the interface-id snmp-if-index command is entered, the affected LSAs will immediately be reoriginated.
For OSPFv3, the ifIndex number is used for the interface ID in router LSAs, as the LSID in Network and Link LSAs, and also as the interface ID in Hello packets. Intra-Area-Prefix LSAs that reference Network LSAs have the network LSAs LSID in the Referenced LSID field, so they will also be updated when the interface-id snmp-if-index command is entered. The old Network, Link and Intra-Area-Prefix LSAs that are associated with a Network LSA will be flushed.
For both OSPFv2 and OSPFv3, adjacencies are not flapped, except for affected OSPFv3 demand circuits (including virtual links) with full adjacencies.
For both OSPFv2 and OSPFv3, if an interface does not have an SNMP ifIndex number and an interface ID is needed (for OSPFv2 this applies only to unnumbered interfaces and sham links), an error message will be generated and the interface will be disabled. The interface will be reenabled if the no interface-id snmp-if-index command is entered.
How to Configure the SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
This section contains the following task:
•
Using SNMP MIB-II ifIndex Numbers and Verifying Configuration (required)
Using SNMP MIB-II ifIndex Numbers and Verifying Configuration
Follow the steps in this task to configure OSPF interfaces to use the SNMP MIB-II ifIndex numbers. These steps work for both OSPFv2 and OSPFv3. All OSPF interfaces must use the SNMP MIB-II ifIndex numbers or the interfaces will not be enabled for OSPF. Therefore, repeat the steps within this task for each OSPF process for which you want the interfaces to use the SNMP MIB-II ifIndex numbers.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
router ospf process-id [vrf vpn-name]
or
ipv6 router ospf process-id
4.
interface-id snmp-if-index
5.
end
6.
show snmp mib ifmib ifindex [interface-type] [slot/][port-adapter/][port]
DETAILED STEPS
Configuration Examples for OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
This section contains the following examples:
•
Configuring the SNMP ifIndex Value for Interface ID for OSPFv2: Example
•
Configuring the SNMP ifIndex Value for Interface ID for OSPFv3: Example
Configuring the SNMP ifIndex Value for Interface ID for OSPFv2: Example
The following example configures the OSPF interfaces to use the SNMP ifIndex values for the interfaces IDs. The show snmp mib ifmib ifindex command confirms that the SNMP MIB-II ifIndex values are used for the Interface ID values in the OSPFv2 data fields.
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.Router(config)# router ospf 1
Router(config-router)# interface-id snmp-if-index
Router(config-router)# ^ZRouter# show ip ospf 1 1 data router selfOSPF Router with ID (172.16.0.1) (Process ID 1)Router Link States (Area 1)LS age: 6Options: (No TOS-capability, DC)LS Type: Router LinksLink State ID: 172.16.0.1Advertising Router: 172.16.0.1LS Seq Number: 80000007Checksum: 0x63AFLength: 48Area Border RouterNumber of Links: 2Link connected to: another Router (point-to-point)(Link ID) Neighboring Router ID: 172.17.0.1(Link Data) Router Interface address: 0.0.0.53Number of TOS metrics: 0TOS 0 Metrics: 64Link connected to: a Stub Network(Link ID) Network/subnet number: 192.168.0.11(Link Data) Network Mask: 255.255.255.255Number of TOS metrics: 0TOS 0 Metrics: 1Router# show snmp mib ifmib ifindex s13/0Serial13/0: Ifindex = 53Configuring the SNMP ifIndex Value for Interface ID for OSPFv3: Example
The following example configures the OSPFv3 interfaces to use the SNMP ifIndex values for the interface IDs.
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.Router(config)# ipv6 router ospf 1
Router(config-router)# interface-id snmp-if-index
The output from the show snmp mib ifmib ifindex command confirms that the SNMP MIB-II ifIndex values are being used for the Interface ID values in the OSPFv2 data fields.
Router# show snmp mib ifmib ifindex Ethernet1/0
Ethernet1/0: Ifindex = 5Router#Router# show ipv6 ospf intOSPF_VL0 is up, line protocol is upInterface ID 71Area 0, Process ID 1, Instance ID 0, Router ID 172.16.0.1Network Type VIRTUAL_LINK, Cost: 10Configured as demand circuit.Run as demand circuit.DoNotAge LSA allowed.Transmit Delay is 1 sec, State POINT_TO_POINT,Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5Hello due in 00:00:02Index 1/2/3, flood queue length 0Next 0x0(0)/0x0(0)/0x0(0)Last flood scan length is 1, maximum is 1Last flood scan time is 0 msec, maximum is 0 msecNeighbor Count is 1, Adjacent neighbor count is 1Adjacent with neighbor 10.0.0.1 (Hello suppressed)Suppress hello for 1 neighbor(s)Ethernet2/0 is up, line protocol is upLink Local Address FE80::A8BB:CCFF:FE00:6F02, Interface ID 10Area 0, Process ID 1, Instance ID 0, Router ID 172.16.0.1Network Type BROADCAST, Cost: 10Transmit Delay is 1 sec, State DR, Priority 1Designated Router (ID) 172.16.0.1, local address FE80::A8BB:CCFF:FE00:6F02No backup designated router on this networkTimer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5Hello due in 00:00:06Index 1/1/2, flood queue length 0Next 0x0(0)/0x0(0)/0x0(0)Last flood scan length is 0, maximum is 0Last flood scan time is 0 msec, maximum is 0 msecNeighbor Count is 0, Adjacent neighbor count is 0Suppress hello for 0 neighbor(s)Ethernet1/0 is up, line protocol is upLink Local Address FE80::A8BB:CCFF:FE00:6F01, Interface ID 6Area 1, Process ID 1, Instance ID 2, Router ID 172.16.0.1Network Type BROADCAST, Cost: 10Transmit Delay is 1 sec, State DR, Priority 1Designated Router (ID) 172.16.0.1, local address FE80::A8BB:CCFF:FE00:6F01Backup Designated router (ID) 10.0.0.1, local address FE80::A8BB:CCFF:FE00:6E01Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5Hello due in 00:00:06Index 1/1/1, flood queue length 0Next 0x0(0)/0x0(0)/0x0(0)Last flood scan length is 1, maximum is 2Last flood scan time is 0 msec, maximum is 0 msecNeighbor Count is 1, Adjacent neighbor count is 1Adjacent with neighbor 10.0.0.1 (Backup Designated Router)Suppress hello for 0 neighbor(s)Router#Router# show ipv6 ospf data net adv 172.16.0.1OSPFv3 Router with ID (172.16.0.1) (Process ID 1)Net Link States (Area 1)LS age: 144Options: (V6-Bit E-Bit R-bit DC-Bit)LS Type: Network LinksLink State ID: 6 (Interface ID of Designated Router)Advertising Router: 172.16.0.1LS Seq Number: 80000001Checksum: 0x1FC0Length: 32Attached Router: 172.16.0.1Attached Router: 10.0.0.1Router# show ipv6 ospf data prefix adv 172.16.0.1OSPFv3 Router with ID (172.16.0.1) (Process ID 1)Intra Area Prefix Link States (Area 0)Routing Bit Set on this LSALS age: 196LS Type: Intra-Area-Prefix-LSALink State ID: 0Advertising Router: 172.16.0.1LS Seq Number: 80000001Checksum: 0x6F11Length: 44Referenced LSA Type: 2001Referenced Link State ID: 0Referenced Advertising Router: 172.16.0.1Number of Prefixes: 1Prefix Address: 2002:0:2::Prefix Length: 64, Options: None, Metric: 10Intra Area Prefix Link States (Area 1)Routing Bit Set on this LSALS age: 161LS Type: Intra-Area-Prefix-LSALink State ID: 0Advertising Router: 172.16.0.1LS Seq Number: 80000001Checksum: 0xB6E7Length: 52Referenced LSA Type: 2001Referenced Link State ID: 0Referenced Advertising Router: 172.16.0.1Number of Prefixes: 1Prefix Address: 2002:0:2:0:A8BB:CCFF:FE00:6F02Prefix Length: 128, Options: LA , Metric: 0Routing Bit Set on this LSALS age: 151LS Type: Intra-Area-Prefix-LSALink State ID: 1006Advertising Router: 172.16.0.1LS Seq Number: 80000001Checksum: 0x6E24Length: 44Referenced LSA Type: 2002Referenced Link State ID: 6Referenced Advertising Router: 172.16.0.1Number of Prefixes: 1Prefix Address: 2002:0:1::Prefix Length: 64, Options: None, Metric: 0Router#Router# show ipv6 ospf data routerOSPFv3 Router with ID (10.0.0.1) (Process ID 1)Router Link States (Area 0)Routing Bit Set on this LSALS age: 5 (DoNotAge)Options: (V6-Bit E-Bit R-bit DC-Bit)LS Type: Router LinksLink State ID: 0Advertising Router: 10.0.0.1LS Seq Number: 80000004Checksum: 0xEE5CLength: 40Area Border RouterNumber of Links: 1Link connected to: a Virtual LinkLink Metric: 10Local Interface ID: 70Neighbor Interface ID: 71Neighbor Router ID: 172.16.0.1LS age: 162Options: (V6-Bit E-Bit R-bit DC-Bit)LS Type: Router LinksLink State ID: 0Advertising Router: 172.16.0.1LS Seq Number: 80000004Checksum: 0xCE7CLength: 40Area Border RouterNumber of Links: 1Link connected to: a Virtual LinkLink Metric: 10Local Interface ID: 71Neighbor Interface ID: 70Neighbor Router ID: 10.0.0.1Router Link States (Area 1)Routing Bit Set on this LSALS age: 176Options: (V6-Bit E-Bit R-bit DC-Bit)LS Type: Router LinksLink State ID: 0Advertising Router: 10.0.0.1LS Seq Number: 80000003Checksum: 0xC807Length: 40Area Border RouterNumber of Links: 1Link connected to: a Transit NetworkLink Metric: 10Local Interface ID: 6Neighbor (DR) Interface ID: 6Neighbor (DR) Router ID: 172.16.0.1LS age: 175Options: (V6-Bit E-Bit R-bit DC-Bit)LS Type: Router LinksLink State ID: 0Advertising Router: 172.16.0.1LS Seq Number: 80000004Checksum: 0xBD10Length: 40Area Border RouterNumber of Links: 1Link connected to: a Transit NetworkLink Metric: 10Local Interface ID: 6Neighbor (DR) Interface ID: 6Neighbor (DR) Router ID: 172.16.0.1Router#Router# show ipv6 ospf data link adv 172.16.0.1OSPFv3 Router with ID (172.16.0.1) (Process ID 1)Link (Type-8) Link States (Area 0)LS age: 245Options: (V6-Bit E-Bit R-bit DC-Bit)LS Type: Link-LSA (Interface: Ethernet2/0)Link State ID: 10 (Interface ID)Advertising Router: 172.16.0.1LS Seq Number: 80000002Checksum: 0xA0CBLength: 56Router Priority: 1Link Local Address: FE80::A8BB:CCFF:FE00:6F02Number of Prefixes: 1Prefix Address: 2002:0:2::Prefix Length: 64, Options: NoneLink (Type-8) Link States (Area 1)LS age: 250Options: (V6-Bit E-Bit R-bit DC-Bit)LS Type: Link-LSA (Interface: Ethernet1/0)Link State ID: 6 (Interface ID)Advertising Router: 172.16.0.1LS Seq Number: 80000001Checksum: 0x4F94Length: 44Router Priority: 1Link Local Address: FE80::A8BB:CCFF:FE00:6F01Number of Prefixes: 0Additional References
The following sections provide references related to the OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields feature.
Related Documents
Related Topic Document TitleOSPF commands
OSPF configuration
Cisco IOS IP Routing: OSPF Configuration Guide, Release 12.4
Standards
MIBs
MIB MIBs LinkNone
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
RFCs
Technical Assistance
Command Reference
This section documents the following command only.
interface-id snmp-if-index
To configure Open Shortest Path First (OSPF) interfaces with SNMP MIB-II ifIndex (Interface Index) identification numbers, use the interface-id snmp-if-index command in router configuration mode. To revert back to the original interface numbering, use the no form of this command.
interface-id snmp-if-index
no interface-id snmp-if-index
Syntax Description
This command has no arguments or keywords.
Command Default
SNMP MIB-II ifIndex numbering for interfaces is disabled.
Command Modes
Router configuration
Command History
Usage Guidelines
The advantage to using SNMP MIB-II ifIndex numbers to identify OSPF interfaces is that the ifIndex number corresponds to the number that a user will see reported by Simple Network Management Protocol (SNMP). Using the SNMP MIB-II ifIndex is also suggested, but not required, by RFC 2328 for OSPFv2 and by RFC 2740 for OSPFv3.
If you want to use the SNMP MIB-II ifIndex numbers, all interfaces that have OSPF enabled must have an SNMP ifIndex number assigned or else OSPF will not be enabled on those interfaces.
Note
A user may choose not to configure SNMP MIB-II ifIndex numbers in order to maintain consistent behavior across upgrades and among routers that may not have the functionality offered with Cisco IOS Release 12.4(6)T and later releases.
Examples
The following example configures the OSPF interfaces to use SNMP MIB-II ifIndex ID numbers. The output from the show snmp mib ifmib ifindex command verifies the configuration.
Router> enableRouter# configure terminalRouter(config)# router ospf 1Router(config-router)# interface-id snmp-if-indexRouter(config-router)# endRouter# show snmp mib ifmib ifindex serial13/0Serial13/0: Ifindex = 53Router# show ip ospf 1 1 data router selfOSPF Router with ID (10.0.0.3) (Process ID 1)Router Link States (Area 1)LS age: 245Options: (No TOS-capability, DC)LS Type: Router LinksLink State ID: 10.0.0.3Advertising Router: 10.0.0.3LS Seq Number: 80000006Checksum: 0x739FLength: 48Area Border RouterNumber of Links: 2Link connected to: another Router (point-to-point)(Link ID) Neighboring Router ID: 10.1.0.1(Link Data) Router Interface address: 0.0.0.54Number of TOS metrics: 0TOS 0 Metrics: 64Link connected to: a Stub Network(Link ID) Network/subnet number: 192.168.0.11(Link Data) Network Mask: 255.255.255.255Number of TOS metrics: 0TOS 0 Metrics: 1Related Commands
Command Descriptionshow snmp mib ifmib ifindex
Displays SNMP interface index identification numbers (ifIndex values) for all the system interfaces or the specified system interface.
Feature Information for OSPF: SNMP ifIndex Value for Interface ID in OSPFv2 and OSPFv3 Data Fields
Table 1 lists the release history for this feature.
Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS and Catalyst OS software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note
Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.
Glossary
SNMP—Simple Network Management Protocol (SNMP) is an application layer protocol that facilitates the exchange of management information between network devices. It is part of the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite.
Note
See Internetworking Terms and Acronyms for terms not included in this glossary.
CCVP, the Cisco Logo, and the Cisco Square Bridge logo are trademarks of Cisco Systems, Inc.; Changing the Way We Work, Live, Play, and Learn is a service mark of Cisco Systems, Inc.; and Access Registrar, Aironet, BPX, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Enterprise/Solver, EtherChannel, EtherFast, EtherSwitch, Fast Step, Follow Me Browsing, FormShare, GigaDrive, GigaStack, HomeLink, Internet Quotient, IOS, iPhone, IP/TV, iQ Expertise, the iQ logo, iQ Net Readiness Scorecard, iQuick Study, LightStream, Linksys, MeetingPlace, MGX, Networking Academy, Network Registrar, Packet, PIX, ProConnect, RateMUX, ScriptShare, SlideCast, SMARTnet, StackWise, The Fastest Way to Increase Your Internet Quotient, and TransPath are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or Website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0612R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
© 2006, 2007 Cisco Systems, Inc. All rights reserved.