Obtain IP through MAC

Not applicable
Posts: 1
4194     0


How can I obtain de IP through a search of MAC ?

I obtain the MAC through a search of IP with:

curl -k -u userSmiley Tonguewd -X GET https://ip_infoblox/wapi/v1.0/ipv4address?ip_address=[ip_to_search]

But for obtain de IP I prove:

curl -k -u userSmiley Tonguewd -X GET https://ip_infoblox/wapi/v1.0/ipv4address?mac_address=[mac_to_search]


curl -k -u userSmiley Tonguewd -X GET https://ip_infoblox/wapi/v1.0/ipv4address?mac=[mac_to_search]


curl -k -u userSmiley Tonguewd -X GET https://ip_infoblox/wapi/v1.0/macfilteraddress?mac=[mac_to_search]

But I find nothing.

So, How can I do for search specific MAC?





I'm not really familiar with

Posts: 39
4195     0

I'm not really familiar with the WAPI but I have found this when only the MAC address is searched :

{ "Error": "AdmConDataError: None (IBDataError: IB.Data:Search fields must contain a parent member or network view.)", 
  "code": "Client.Ibap.Data", 
  "text": "Search fields must contain a parent member or network view."


When I add '&network_view=default' (as indicated by the error message) the search works. It also returns results if you specify the network.

I would also suggest in using ':=' instead of '=' when searching on mac_address as the search becomes case insensitive.


Obtain IP through MAC

Posts: 1
4195     0


I notice that you're running Version 1 of the WAPI.  I don't think that there's a way to search by MAC address in that version.  I've been trying to do the same thing and IB support says that I need to upgrade NIOS to get the WAPI version up to 1.2.1 to do this.  Until then, I have to use the perl API.

Infoblox sent to me this procedure that would work if you're at WAPI v1.2.1:

                Figure out what MAC (in the example below) or IP you want data on.
                Search for the lease for that particular device (I’m using the MAC address) as follows:
•         curl -k3 -c cookie.txt -b cookie.txt -X GET -d objtype=lease -d search_string:=F8:1ESmiley Very HappyFSmiley Very HappyA:4DSmiley Very HappyF
        "_ref": "lease/ZG5zLmxlYXNlJDAvMTkyLjE2OC4xLjg5LzAv:",
        "address": "",
        "network_view": "default"
                Take the “_ref” data and replace the “search” part of the URL.  You’ll be adding in a different “-d” option as well.
•         curl -k3 –u admin -X GET –d -return_fields="address,client_hostname,discovered_data,network,network_view,server_host_name,uid,username,variable"
    "_ref": "lease/ZG5zLmxlYXNlJDAvMTkyLjE2OC4xLjg5LzAv:",
    "address": "",
    "client_hostname": "\"dsmith-mac\"",
    "discovered_data": {
        "discovered_name": "dhcp-192-168-1-89.home.local",
        "discoverer": "NetMRI",
        "first_discovered": 1282763425,
        "last_discovered": 1382980048,
        "mac_address": "f8:1e:df:da:4d:df",
        "netbios_name": "DSMITH-MAC",
        "network_component_description": "Switch",
        "network_component_ip": "",
        "network_component_name": "cisco3524xl-1",
        "network_component_port_description": "Uplink to home network",
        "network_component_port_name": "Fa0/24",
        "network_component_port_number": 38,
        "network_component_type": "Switch",
        "os": "Microsoft",
        "port_link_status": "Connected",
        "port_speed": "100M",
        "port_status": "Up",
        "port_vlan_name": "default",
        "port_vlan_number": 1
    "network": "",
    "network_view": "default",
    "server_host_name": "gm.lab.local",
    "uid": "\"\\001\\370\\036\\337\\332M\\337\"",
    "username": "don-mac-wireless",
    "variable": "ddns-rev-name=\"\" ddns-txt=\"3100247a8bcc5cdfd51aa21e6603f75db5\" ddns-fwd-name=\"dsmith-mac.home.local\" lt=\"undefined\""

Re: I'm not really familiar with

Posts: 7
4195     0

I'm running WAPI 2.11.2 and this does not work:



When I specify network_view=default, I get yet another error message:


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

I'm trying to get the IP address based on MAC, so clearly I don't have an IP nor a network at this point. What am I missing?



Showing results for 
Search instead for 
Did you mean: 

Recommended for You