Reply

Find IP Based on MAC

Techie
Posts: 7
3831     0

I'm looking for a way to find IP address based on MAC address.

 

API Call:

 

https://[GM]/wapi/v2.11.2/ipv4address?network_view=default&mac_address:=[MAC]

According to the WAPI documentation for 2.11.2, the mac_address field is part of the base object and is searchable. However, when I try searching for mac_address, I get the following error:

 

AdmConDataError: None (IBDataError: IB.Data:Search fields must contain a parent member or network view.

If I try specifying a default network view, I get yet another error:

 

AdmConProtoError: When searching by network_view one of \\"ip_address\\", \\"network\\" must also be searched on

If I have only a MAC address, I clearly don't have the network it belongs to, so how can I simply search Infoblox for a MAC address via API?

 

Re: Find IP Based on MAC

Adviser
Posts: 181
3831     0

Hi,

 

Are you trying to search for the fixed address based on the MAC address? If yes, you can do so using the below WAPI:

Sample API:
curl -k -u admin:infoblox -X GET "https://grid-
master/wapi/v2.11/fixedaddress?_return_fields%2B=mac&mac=aa:bb:cc:11:22:21&_return_as_object=1"

Sample Output:
{"result":  
  [{"_ref": 
"fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTkyLjE2OC4xLjEwMC4wLi4:192.168.1.100/default", 
   "ipv4addr": "192.168.1.100", 
   "mac": "aa:bb:cc:11:22:21", 
   "network_view": "default" 
}]} 

Hope this helpful,

Regards,

Krishna Vasudevan

Re: Find IP Based on MAC

New Member
Posts: 3
3831     0

It would be useful to find the ip address with only the mac address available.

Re: Find IP Based on MAC

[ Edited ]
New Member
Posts: 3
3831     0

Try to use

https: / / {{grid_master}} / wapi / v2.11 / search?mac_address=11:22:33:44:55:66

 

where grid_master = ip of your grid master (or DNS name)

Showing results for 
Search instead for 
Did you mean: 

Recommended for You