What oid can be used for get IP address for specific port, example ip for ifindex3.
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.
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.
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.
User | Count |
---|---|
2593 | |
1381 | |
800 | |
659 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.