Skip to main content
HS08
Valued Contributor
Jul 16, 2025 12:44 AM UTC
Question

IP Addr SNMP

What oid can be used for get IP address for specific port, example ip for ifindex3.

3 replies

AEK
SuperUser
SuperUser
Jul 16, 2025 4:37 PM UTC

Trying snmpwalk and found this on my FGT (6.2.16):

iso.3.6.1.2.1.4.20.1.1.x.x.x.x = IpAddress: x.x.x.x
iso.3.6.1.2.1.4.20.1.2.x.x.x.x = INTEGER: y

Where x.x.x.x is IP address of the interface, and y is the snmp-index.

Not exactly what you are looking for but it may help a bit.

Translate
AEK
HS08
HS08Author
Valued Contributor
Jul 18, 2025 3:46 AM UTC

Currently i build simple SNMP manager application then i need to query ip address from port1 where the ip from port1 using DHCP from ISP. So i need the oid to query the ip address to be integrated with my own application.

Translate
AEK
SuperUser
SuperUser
Jul 20, 2025 4:48 PM UTC

With what you have in hand, I guess your only option is customize the script to do snmpwalk on "iso.3.6.1.2.1.4.20.1.2." and it may select the entry that correspond the right snmp-index, and then it will need to extract the IP from the output with some command like "re.search" in python.

Translate
AEK
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024