> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/references/references-classic/glossary-classic/connection-classic.md).

# 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](/references/references-classic/database-information-and-organization-classic/status-of-tcp-connections-classic.md).

UDP

The connection is [stateless](/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](/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](/references/references-classic/glossary-classic/activity-classic.md)
* [Port](/references/references-classic/glossary-classic/port-classic.md)
* [Device](/references/references-classic/glossary-classic/device-classic.md)
* [Destination](/references/references-classic/glossary-classic/destination-classic.md)

RELATED REFERENCES

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
