How to work with SNMP v2 Contexts in Nexus 7000
This is an example on how to obtain list of IP addresses assigned to Interfaces inside specific SNMP Context on Nexus 7000
Obtain list of all SNMP Contexts by sending SNMP GET Bulk for cContextMappingVrfName (.18.104.22.168.22.214.171.124.4126.96.36.199.2)
In this response Nexus 7018 Switch has only one SNMP context with a name “management”
Obtain list of all IP addressses that exist in context “management” by sending SNMP GET Bulk for ipAdEntIfIndex (.188.8.131.52.184.108.40.206.1.2)
Note that for this step step we have append context name to V2 community string
(e.g public@management) to specify that this request is specific for context “management”.
In this response we have IP address [10.255.27.34] and associated interface ifIndex “83886080”
Find interface name with ifIndex 83886080 by sending SNMP GET Bulk for (.220.127.116.11.18.104.22.168.1.2)
‘22.214.171.124.126.96.36.199.1.2.83886080’ => “mgmt0”
So in these 3 steps we have found that Interface Mgmt0 has assigned an ip address 10.255.27.34
Leave a ReplyWant to join the discussion?
Feel free to contribute!