Skip to main content
Splunk Lantern

Volume of traffic between source-destination pairs

You might need to understand the network traffic volume between IP addresses in your network and external IP addresses when doing the following:

Prerequisites 

In order to execute this procedure in your environment, the following data, services, or apps are required:

Example

Your organization has been experiencing sluggish performance on its network. You want to identify problematic destination IP addresses and establish alerts for when network usage becomes too high so you can clean up bandwidth bottlenecks.

To optimize the search shown below, you should specify an index and a time range. In addition, this sample search uses Fortinet FortiGate data. You can replace this source with any other firewall data used in your organization.

  1. Run the following search: 
sourcetype=fgt_traffic src=<IP address sending the request> NOT (dest=<Internal IP address> OR dest=<DNS>)
| stats sum(bytes_in) sum(bytes_out) BY src dest
| table src dest bytes_in bytes_out
| sort – bytes_out

Search Explanation

The table provides an explanation of what each part of this search achieves. You can adjust this query based on the specifics of your environment.

Splunk Search Explanation

sourcetype=fgt_traffic 

Search only Fortinet FortiGate network traffic data.

src=<IP address sending the request> 

Search data coming from this IP address.

If you want to search all IP addresses in a netblock, use a wildcard search. For example, src=192.168.255.*

NOT (dest=<Internal IP address> OR dest=<DNS>)

Exclude internal and DNS destination IP addresses.

Logs vary in the information they contain. Not all logs have hostnames or IP addresses. Sometimes the dest field will have a hostname in it but sometimes it will have an IP address. Parentheses and OR statements will broaden your search so you don’t miss anything. 

Example:
(dest=”192.0.2.0” OR dest_ip=”192.0.2.0”)

Example:
(dest=”192.0.2.0” OR dest=”example.com”)

| stats sum(bytes_in) sum(bytes_out) BY src dest

Sum the total volume of bytes_out and the total volume of bytes in for each source-destination pair.

| table src dest bytes_in bytes_out

Display the results in a table with columns in the order shown.

| sort – bytes_out

Sort the results by the source-destination pair with the largest volume of bytes out first.

Result

Use the results to establish baselines or examine the results for outliers. Change the sort order as needed to look at the top inbound byte volumes or the lowest byte counts, if that is appropriate for your use case. Set an alert for when the number of source-destination connections exceeds a certain threshold. You can also monitor for potential concerns, such as many hosts from the same subnet all communicating to the same destination IP, with identical byte counts, both in and out. 

  • Was this article helpful?