If you are just trying to get a distinct list of all IPs in your data, then you could do something simple like:
YOUR BASE SEARCH |
| eval allips = coalesce(src_ip,dest_ip)
| stats count by allips
| fields - count
This is an example giving a unique list of all IPs that showed up in the two fields in the coalesce command. Coalesce merges the fields specified into the field you create in the eval.