Forum Discussion

David_Desjardin's avatar
David_Desjardin
Icon for Nimbostratus rankNimbostratus
Nov 15, 2021

Icontrol rest api net arp

Hello,

 

looking at the documentation on getting arp entries from the bigip api, it shows to use "/mgmt/tm/net/arp". It shows Resource key of "partition" and "properties" of macAddress. When using postman and just going to "/mgmt/tm/net/arp" I get back an empty list but I think it's because I'm not passing partition.

 

How do you build a uri that gets the arp entries for a given partition? I have tried to google examples but have yet to come across anything.

 

Thanks,

Dave

1 Reply

  • xuwen's avatar
    xuwen
    Icon for Cumulonimbus rankCumulonimbus

    use python f5-sdk:

    from f5.bigip import ManagementRoot

     

    mgmt = ManagementRoot('192.168.5.108', 'admin', 'xt32112300')

     

    show_arp = "tmsh -c 'cd /Common/; show net arp'"

    a = mgmt.tm.util.bash.exec_cmd('run', utilCmdArgs='-c "{}"'.format(show_arp))

    print(a.commandResult)

     

     

    python running result:

     

    --------------------------------------------------------------------------------

    Net::Arp  

    Name     Address   HWaddress     Vlan          Expire-in-sec Status

    --------------------------------------------------------------------------------

    172.16.10.2 172.16.10.2 00:0c:29:73:5d:8d /Common/vlan-internal 208      resolved