Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
HS08
Contributor

IP Addr SNMP

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

3 REPLIES 3
AEK
SuperUser
SuperUser

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
AEK
HS08
Contributor

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

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
AEK
Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors