Skip to main content
HS08
Visitor III
July 16, 2025
Question

IP Addr SNMP

  • July 16, 2025
  • 2 replies
  • 525 views

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

2 replies

AEK
SuperUser
SuperUser
July 16, 2025

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.

AEK
HS08
HS08Author
Visitor III
July 18, 2025

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.

AEK
SuperUser
SuperUser
July 20, 2025

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.

AEK