The /usr/demo/sma_snmp/demo_module_11 code example shows how the Entity MIB module can be used. The demo module is designed to populate the empty MIB tables that are created when the libentity.so module is dynamically loaded into the agent. The data that is loaded is described in this section.
You should examine the code in demo_module_11, especially the code in the MyTable.c file. The file README_demo_module_11 in that directory includes procedures for building and using the example.
The demo_module_11 example refers to a system with the following components that need to be managed:
Two boards, with two CPU modules on each board
One board that contains three ports
Two logical domains
Two firewall instances
These components can be divided into the following entities:
14 physical entities
1 chassis
3 slots in the chassis
3 boards in the slots
4 CPU modules in two boards
3 ports in one board
4 logical entities
2 domains
2 firewalls
Some of the physical entities are contained in other physical entities. The logical entities are associated with particular physical entities. The Entity MIB tables should be populated to show the relationships among the various entities.
The following examples demonstrate how the MIB tables could be populated for this system.
The entPhysicalTable might be populated with the following values:
One field-replaceable physical chassis:
entPhysicalDescr.1 == 'Sun Chassis Model b1000' entPhysicalVendorType.1 == sun.chassisTypes.1 entPhysicalContainedIn.1 == 0 entPhysicalClass.1 == chassis(3) entPhysicalParentRelPos.1 == -1 entPhysicalName.1 == 'b1000' entPhysicalHardwareRev.1 == 'A(1.00.02)' entPhysicalSoftwareRev.1 == '' entPhysicalFirmwareRev.1 == '' entPhysicalSerialNum.1 == 'C100076544' entPhysicalMfgName.1 == 'Sun Microsystems' entPhysicalModelName.1 == 'CHS-1000' entPhysicalAlias.1 == 'cl-SJ17-3-006:rack1:rtr-U3' entPhysicalAssetID.1 == '0007372293' entPhysicalIsFRU.1 == true(1)
Slot 1 within the chassis:
entPhysicalDescr.2 == 'Sun Chassis Slot Type AA' entPhysicalVendorType.2 == sun.slotTypes.1 entPhysicalContainedIn.2 == 1 entPhysicalClass.2 == container(5) entPhysicalParentRelPos.2 == 1 entPhysicalName.2 == 'S1' entPhysicalHardwareRev.2 == 'B(1.00.01)' entPhysicalSoftwareRev.2 == '' entPhysicalFirmwareRev.2 == '' entPhysicalSerialNum.2 == '' entPhysicalMfgName.2 == 'Sun Microsystems' entPhysicalModelName.2 == 'SLT-AA97' entPhysicalAlias.2 == '' entPhysicalAssetID.2 == '' entPhysicalIsFRU.2 == false(2)
Slot 2 within the chassis:
entPhysicalDescr.3 == 'Sun Chassis Slot Type AA' entPhysicalVendorType.3 = sun.slotTypes.1 entPhysicalContainedIn.3 == 1 entPhysicalClass.3 == container(5) entPhysicalParentRelPos.3 == 2 entPhysicalName.3 == 'S2' entPhysicalHardwareRev.3 == '1.00.07' entPhysicalSoftwareRev.3 == '' entPhysicalFirmwareRev.3 == '' entPhysicalSerialNum.3 == '' entPhysicalMfgName.3 == 'Sun Microsystems' entPhysicalModelName.3 == 'SLT-AA97' entPhysicalAlias.3 == '' entPhysicalAssetID.3 == '' entPhysicalIsFRU.3 == false(2)
Slot 3 within the chassis:
entPhysicalDescr.4 == 'Sun Chassis Slot Type AA' entPhysicalVendorType.4 = sun.slotTypes.1 entPhysicalContainedIn.4 == 1 entPhysicalClass.4 == container(5) entPhysicalParentRelPos.4 == 3 entPhysicalName.4 == 'S3' entPhysicalHardwareRev.4 == '1.00.07' entPhysicalSoftwareRev.4 == '' entPhysicalFirmwareRev.4 == '' entPhysicalSerialNum.4 == '' entPhysicalMfgName.4 == 'Sun Microsystems' entPhysicalModelName.4 == 'SLT-AA97' entPhysicalAlias.4 == '' entPhysicalAssetID.4 == '' entPhysicalIsFRU.4 == false(2)
Board 1 within Slot 1:
entPhysicalDescr.5 == 'Sun CPU-100' entPhysicalVendorType.5 == sun.moduleTypes.14 entPhysicalContainedIn.5 == 2 entPhysicalClass.5 == module(9) entPhysicalParentRelPos.5 == 1 entPhysicalName.5 == 'M1' entPhysicalHardwareRev.5 == '1.00.07' entPhysicalSoftwareRev.5 == '1.5.1' entPhysicalFirmwareRev.5 == 'A(1.1)' entPhysicalSerialNum.5 == 'C100087363' entPhysicalMfgName.5 == 'Sun Microsystems' entPhysicalModelName.5 == 'R10-FE00' entPhysicalAlias.5 == 'rtr-U3:m1:SJ17-3-eng' entPhysicalAssetID.5 == '0007372562' entPhysicalIsFRU.5 == true(1)
First CPU, in Board 1, within Slot 1:
entPhysicalDescr.6 == 'Sun Ultrasparc-III 400MHz' entPhysicalVendorType.6 == sun.cpuTypes.2 entPhysicalContainedIn.6 == 5 entPhysicalClass.6 == other(1) entPhysicalParentRelPos.6 == 1 entPhysicalName.6 == 'P1' entPhysicalHardwareRev.6 == 'G(1.02)' entPhysicalSoftwareRev.6 == '' entPhysicalFirmwareRev.6 == '1.1' entPhysicalSerialNum.6 == '' entPhysicalMfgName.6 == 'Sun Microsystems' entPhysicalModelName.6 == 'SFE-400M' entPhysicalAlias.6 == '' entPhysicalAssetID.6 == '' entPhysicalIsFRU.6 == false(2)
Second CPU, in Board 1, within Slot 1:
entPhysicalDescr.7 == 'Sun Ultrasparc-III 400MHz' entPhysicalVendorType.7 == sun.cpuTypes.2 entPhysicalContainedIn.7 == 5 entPhysicalClass.7 == other(1) entPhysicalParentRelPos.7 == 2 entPhysicalName.7 == 'P2' entPhysicalHardwareRev.7 == 'G(1.02)' entPhysicalSoftwareRev.7 == '' entPhysicalFirmwareRev.7 == '1.1' entPhysicalSerialNum.7 == '' entPhysicalMfgName.7 == 'Sun Microsystems' entPhysicalModelName.7 == 'SFE-400M' entPhysicalAlias.7 == '' entPhysicalAssetID.7 == '' entPhysicalIsFRU.7 == false(2)
Board 2 within Slot 2:
entPhysicalDescr.8 == 'Sun CPU-200' entPhysicalVendorType.8 == sun.moduleTypes.15 entPhysicalContainedIn.8 == 3 entPhysicalClass.8 == module(9) entPhysicalParentRelPos.8 == 1 entPhysicalName.8 == 'M2' entPhysicalHardwareRev.8 == '2.01.00' entPhysicalSoftwareRev.8 == '3.0.7' entPhysicalFirmwareRev.8 == 'A(1.2)' entPhysicalSerialNum.8 == 'C100098732' entPhysicalMfgName.8 == 'Sun Microsystems' entPhysicalModelName.8 == 'R10-FE0C' entPhysicalAlias.8 == 'rtr-U3:m2:SJ17-2-eng' entPhysicalAssetID.8 == '0007373982' entPhysicalIsFRU.8 == true(1)
Third CPU, in Board 2, within Slot 2:
entPhysicalDescr.9 == 'Sun Ultrasparc-III 400MHz' entPhysicalVendorType.9 == sun.cpuTypes.5 entPhysicalContainedIn.9 == 8 entPhysicalClass.9 == other(1) entPhysicalParentRelPos.9 == 1 entPhysicalName.9 == 'P3' entPhysicalHardwareRev.9 == 'CC(1.07)' entPhysicalSoftwareRev.9 == '2.0.34' entPhysicalFirmwareRev.9 == '1.1' entPhysicalSerialNum.9 == '' entPhysicalMfgName.9 == 'Sun Microsystems' entPhysicalModelName.9 == 'SFE-400M' entPhysicalAlias.9 == '' entPhysicalAssetID.9 == '' entPhysicalIsFRU.9 == false(2)
Fourth CPU, in Board 2, within Slot 2:
entPhysicalDescr.10 == 'Sun Ultrasparc-III 400MHz' entPhysicalVendorType.10 == sun.cpuTypes.2 entPhysicalContainedIn.10 == 8 entPhysicalClass.10 == other(1) entPhysicalParentRelPos.10 == 2 entPhysicalName.10 == 'P4' entPhysicalHardwareRev.10 == 'G(1.04)' entPhysicalSoftwareRev.10 == '' entPhysicalFirmwareRev.10 == '1.3' entPhysicalSerialNum.10 == '' entPhysicalMfgName.10 == 'Sun Microsystems' entPhysicalModelName.10 == 'SFE-400M' entPhysicalAlias.10 == '' entPhysicalAssetID.10 == '' entPhysicalIsFRU.10 == false(2)
Board 3 within Slot 3:
entPhysicalDescr.11 == 'Sun port-200' entPhysicalVendorType.11 == sun.moduleTypes.25 entPhysicalContainedIn.11 == 4 entPhysicalClass.11 == module(9) entPhysicalParentRelPos.11 == 1 entPhysicalName.11 == 'M2' entPhysicalHardwareRev.11 == '2.01.00' entPhysicalSoftwareRev.11 == '3.0.7' entPhysicalFirmwareRev.11 == 'A(1.2)' entPhysicalSerialNum.11 == 'C100098732' entPhysicalMfgName.11 == 'Sun Microsystems' entPhysicalModelName.11 == 'R11-C100' entPhysicalAlias.11 == 'rtr-U3:m2:SJ17-2-eng' entPhysicalAssetID.11 == '0007373982' entPhysicalIsFRU.11 == true(1)
Port 1, in Board 3, within Slot 3:
entPhysicalDescr.12 == 'Sun Ethernet-100 Port' entPhysicalVendorType.12 == sun.portTypes.5 entPhysicalContainedIn.12 == 11 entPhysicalClass.12 == port(10) entPhysicalParentRelPos.12 == 1 entPhysicalName.12 == 'P3' entPhysicalHardwareRev.12 == 'CC(1.07)' entPhysicalSoftwareRev.12 == '2.0.34' entPhysicalFirmwareRev.12 == '1.1' entPhysicalSerialNum.12 == '' entPhysicalMfgName.12 == 'Sun Microsystems' entPhysicalModelName.12 == 'SFE-P100' entPhysicalAlias.12 == '' entPhysicalAssetID.12 == '' entPhysicalIsFRU.12 == false(2)
Port 2, in Board 3, within Slot 3:
entPhysicalDescr.13 == 'Sun Ethernet-100 Port' entPhysicalVendorType.13 == sun.portTypes.5 entPhysicalContainedIn.13 == 11 entPhysicalClass.13 == port(10) entPhysicalParentRelPos.13 == 2 entPhysicalName.13 == 'Ethernet B' entPhysicalHardwareRev.13 == 'G(1.04)' entPhysicalSoftwareRev.13 == '' entPhysicalFirmwareRev.13 == '1.3' entPhysicalSerialNum.13 == '' entPhysicalMfgName.13 == 'Sun Microsystems' entPhysicalModelName.13 == 'SFE-P100' entPhysicalAlias.13 == '' entPhysicalAssetID.13 == '' entPhysicalIsFRU.13 == false(2)
Port 3, in Board 3, within Slot 3:
entPhysicalDescr.14 == 'Sun Ethernet-100 Port' entPhysicalVendorType.14 == sun.portTypes.5 entPhysicalContainedIn.14 == 11 entPhysicalClass.14 == port(10) entPhysicalParentRelPos.14 == 3 entPhysicalName.14 == 'Ethernet B' entPhysicalHardwareRev.14 == 'G(1.04)' entPhysicalSoftwareRev.14 == '' entPhysicalFirmwareRev.14 == '1.3' entPhysicalSerialNum.14 == '' entPhysicalMfgName.14 == 'Sun Microsystems' entPhysicalModelName.14 == 'SFE-P100' entPhysicalAlias.14 == '' entPhysicalAssetID.14 == '' entPhysicalIsFRU.14 == false(2)
The entLogicalTable is populated with the following values when you run demo_module_11:
Logical Domain “A”
entLogicalDescr.1 == 'Domain A' entLogicalType.1 == solaris entLogicalCommunity.1 == 'public-dom1' entLogicalTAddress.1 == 124.125.126.127:161 entLogicalTDomain.1 == SunExampleDomain entLogicalContextEngineID.1 == '' entLogicalContextName.1 == ''
Logical Domain “B”
entLogicalDescr.2 == 'Domain B' entLogicalType.2 == solaris entLogicalCommunity.2 == 'public-dom2' entLogicalTAddress.2 == 124.125.126.128:161 entLogicalTDomain.2 == SunExampleDomain entLogicalContextEngineID.2 == '' entLogicalContextName.2 == ''
Firewall 1
entLogicalDescr.3 == 'Sun Firewall v2.1.1' entLogicalType.3 == dot1dFirewall entLogicalCommunity.3 == 'public-firewall1' entLogicalTAddress.3 == 124.125.126.129:161 entLogicalTDomain.3 == SunExampleDomain entLogicalContextEngineID.3 == '' entLogicalContextName.3 == ''
Firewall 2
entLogicalDescr.4 == 'Sun Firewall v2.1.1' entLogicalType.4 == dot1dFirewall entLogicalCommunity.4 == 'public-firewall2' entLogicalTAddress.4 == 124.125.126.130:161 entLogicalTDomain.4 == SunExampleDomain entLogicalContextEngineID.4 == '' entLogicalContextName.4 == ''
entLogicalTable does not support SNMPv3 in this example.
The entLPMappingsTable is populated with the objects and values in the right column of the following table when you run demo_module_11.
The entAliasMappingTable is populated with the following objects and values when you run demo_module_11.
If the ifIndex values are shared by all logical entities, the entAliasMappingTable might be populated as follows:
entAliasMappingIdentifier.12.0 == ifIndex.1 entAliasMappingIdentifier.13.0 == ifIndex.2 entAliasMappingIdentifier.14.0 == ifIndex.3
The first index in the entAliasMappingIdentifier signifies the physical index. In this case, physical entities with the indexes 12, 13, and 14 are Port 1, Port 2, and Port 3. In the preceding entAliasMappingIdentifier assignments, Port 1 is mapped to ifIndex.1, Port 2 is mapped to ifIndex.2, and Port 3 is mapped to ifIndex.3. This mapping is for all logical entities that use each of these ports.
If the ifIndex values are not shared by all logical entities, the entAliasMappingTable might be populated as follows:
entAliasMappingIdentifier.12.0 == ifIndex.1 entAliasMappingIdentifier.12.3 == ifIndex.101 entAliasMappingIdentifier.13.0 == ifIndex.2 entAliasMappingIdentifier.13.3 == ifIndex.102 entAliasMappingIdentifier.14.0 == ifIndex.3 entAliasMappingIdentifier.14.3 == ifIndex.103
In this case, one logical entity is mapped differently. Firewall 1, which is entLogicalIndex.3, is mapped as follows:
ifIndex.101 on Port 1
ifIndex.102 on Port 2
ifIndex.103 on Port 3
The following table shows the containment relationships among the physical entities. The right column of the table lists the entries added to the entPhysicalContainsTable of the Entity MIB by demo_module_11.
Physical Entity |
Contains |
entPhysicalContainsTable Entry |
---|---|---|
Chassis |
Slot 1 |
entPhysicalChildIndex.1.2 == 2 |
Slot 2 |
entPhysicalChildIndex.1.3 == 3 |
|
Slot 3 |
entPhysicalChildIndex.1.4 == 4 |
|
Slot 1 |
Board 1 |
entPhysicalChildIndex.2.5 == 5 |
Slot 2 |
Board 2 |
entPhysicalChildIndex.3.8 == 8 |
Slot 3 |
Board 3 |
entPhysicalChildIndex.4.11 == 11 |
Board 1 |
CPU 1 |
entPhysicalChildIndex.4.6 == 6 |
CPU 2 |
entPhysicalChildIndex.4.7 == 7 |
|
Board 2 |
CPU 3 |
entPhysicalChildIndex.8.9 == 9 |
CPU 4 |
entPhysicalChildIndex.8.10 == 10 |
|
Board 3 |
Port 1 |
entPhysicalChildIndex.11.12 == 12 |
Port 2 |
entPhysicalChildIndex.11.13 == 13 |
|
Port 3 |
entPhysicalChildIndex.11.14 == 14 |