Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Security

Reply
Highlighted

Get DHCP information

Techie
Posts: 5
2670     0

Hi all Smiley Happy !

I have several information about DHCP in Infoblox that I can access through the web application in the following menu:

Data management -> DHCP -> Networks -> Shared Networks.

And my problem is that I want to retrieve data with a Perl script. Currently, my script can connect to Infoblox, but i don't know how I can get this data.

I hope I was clear (I'm french) an thank you for your help.

Highlighted

Try IBCLI

Techie
Posts: 2
2671     0

Hakan,

 

    I don't know if you've looked into IBCLI, but if what you want is to use a script to do some show commands, that is probably the quickest way to do it (http://ibcli.blogspot.com/).  You can download the IBCLI script (which is Perl) and run that to, in essence, get a command line interface.  It will also take a file input of a list of commands.  There is also a user guide for IBCLI - here is the link to the show command for shared networks:

http://slchorne.github.io/ibcli/user_guide_ibcli.html#showing_shared_networks

Highlighted

Hi Ross,

Techie
Posts: 5
2671     0

Hi Ross,

Thank you for your great answer. I downloaded IBCli here.

I found a tutorial which explain how to use IBCli.

Now, I want to print information that I get through Infoblox:Smiley Very HappyHCP::NetworkContainer.

Do you have an idea ?

Highlighted

Hakan,

Posts: 75
2671     0

Hakan,

 

ibCLI jus returns information to your screen.  I usually just output the results to a text file.

Can you send what you have so far and which part isn't working?  That would help in the troubleshooting process.

 

Susan

 

Highlighted

Hi Susan,

Techie
Posts: 5
2671     0

Hi Susan,

Thank you for your answer Smiley Happy.

When I execute the following command, I get the expected result :

admin@*.*.*.* > show network
Search : Infoblox:Smiley Very HappyHCP::Network:
Search : Infoblox:Smiley Very HappyHCP::NetworkContainer:
10.0.0.0/24 (vlan (interne) [vlan 10]) (default), *.*.*.fr(*.*.*.*)
130.190.143.0/24 (ToIP - VM (externe) [vlan 118]) (default), *.*.*.fr(*.*.*.*)
130.190.148.0/22 (ToIP - SMH (externe) [vlan 118]) (default), *.*.*.fr(*.*.*.*)
192.168.43.16/28 (Admin-VM (interne) [vlan 56]) (default), *.*.*.fr(*.*.*.*)
192.168.46.160/27 (EPCS - SMH (interne) [vlan 187]) (default), *.*.*.fr(*.*.*.*)
192.168.49.0/24 (SICD2 (interne) [vlan 47]) (default), *.*.*.fr(*.*.*.*)
192.168.62.128/26 (CLV, Droit, LNT (interne) [vlan 40]) (default), *.*.*.fr(*.*.*.*)
192.168.62.192/27 (Admin-VM (interne) [vlan 56]) (default), *.*.*.fr(*.*.*.*)
+192.168.100.0/24 () (default)
192.168.100.0/26 (SICD2 (interne) [vlan 47]) (default), *.*.*.fr(*.*.*.*)
192.168.100.64/26 (Libre (interne)) (default), *.*.*.fr(*.*.*.*)
192.168.100.128/25 (Libre (interne)) (default), *.*.*.fr(*.*.*.*)
193.54.187.0/24 (EPCS - SMH (externe) [vlan 187]) (default), *.*.*.fr(*.*.*.*)
193.54.199.224/27 (ToIP - LM (externe) [vlan 118]) (default), *.*.*.fr(*.*.*.*)
195.221.40.0/24 (CLV, Droit, LNT (externe) [vlan 40]) (default), *.*.*.fr(*.*.*.*)
195.221.47.0/24 (SICD2 (externe) [vlan 47]) (default), *.*.*.fr(*.*.*.*)
195.221.56.0/26 (Admin-VM (externe) [vlan 56]) (default), *.*.*.fr(*.*.*.*)
17 networks found

Now, I want to know how can I develop my own script to have the same result ?

I tried to write something but I know that is incomplete :

my @retrieved_objs = $session->get("object" => "Infoblox:Smiley Very HappyHCP::NetworkContainer");
if ($session->status_code() eq 0)
{
    print "OK.\n";
    foreach (@retrieved_objs)
    {
        print $_ . "\n";
    }
}
else
{
    print "Error.\n";
    print "Code: " . $session->status_code() . "\n";
    print "Detail: " . $session->status_detail() . "\n";
}

Showing results for 
Search instead for 
Do you mean 

Recommended for You