# Connection (classic)

A *connection* is a link between a device and a destination through the use of network resources. There are two types of connections depending on the transport protocol used for communication:

TCP

The connection has a [status](/platform/references/references-classic/database-information-and-organization-classic/status-of-tcp-connections-classic.md).

UDP

The connection is [stateless](/platform/references/references-classic/database-information-and-organization-classic/status-of-udp-connections-classic.md).

For TCP connections, the link between device and destination does not need to be fully established for Nexthink to record the connection. For UDP connections, it is not possible to know if the connection was established, due to the own nature of the protocol. Thus, for any protocol, every connection attempt that Nexthink detects is recorded on the Nexthink database no matter whether the connection is successful or not.

Some repetitive short-lived connections are automatically grouped into one single aggregated connection when some sort of scanning is detected:

Network scan

A repeated attempt to connect to the same port on several destinations.

Port scan

A repeated attempt to connect to different ports on the same destination.

Network and port scans can be launched by legitimate processes, but they may also indicate the existence of malicious activity in your network. Scanning communication ports in one or several machines is a widely used method to detect vulnerabilities in computer networks.

Only connections using the same transport protocol may be grouped into a single scan connection. Thus, there are four types of scan connections:

| Protocol \ Type | Network          | Port          |
| --------------- | ---------------- | ------------- |
| TCP             | TCP network scan | TCP port scan |
| UDP             | UDP network scan | UDP port scan |

See [Network and port scan conditions](/platform/references/references-classic/database-information-and-organization-classic/network-and-port-scan-conditions-classic.md) to find out when Nexthink regards a set TCP and UDP connections as a scanning operation.

***

RELATED CONCEPTS

* [Activity](/platform/references/references-classic/glossary-classic/activity-classic.md)
* [Port](/platform/references/references-classic/glossary-classic/port-classic.md)
* [Device](/platform/references/references-classic/glossary-classic/device-classic.md)
* [Destination](/platform/references/references-classic/glossary-classic/destination-classic.md)

RELATED REFERENCES

* [Status of TCP connections](/platform/references/references-classic/database-information-and-organization-classic/status-of-tcp-connections-classic.md)
* [Status of UDP connections](/platform/references/references-classic/database-information-and-organization-classic/status-of-udp-connections-classic.md)
* [Network and port scan conditions](/platform/references/references-classic/database-information-and-organization-classic/network-and-port-scan-conditions-classic.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexthink.com/platform/references/references-classic/glossary-classic/connection-classic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
