--- layout: docs page_title: Networking description: |- Learn about Nomad's networking internals and how it compares with other tools. --- # Networking Nomad is a workload orchestrator and so it focuses on the scheduling aspects of a deployment, touching areas such as networking as little as possible. **Networking in Nomad is usually done via _configuration_ instead of _infrastructure_**. This means that Nomad provides ways for you to access the information you need to connect your workloads instead of running additional components behind the scenes, such as DNS servers and load balancers. This can be confusing at first since it is quite different from what you may be used to from other tools. This section explains how networking works in Nomad, some of the different patterns and configurations you are likely to find and use, and how Nomad differs from other tools in this aspect. ## Allocation networking The base unit of scheduling in Nomad is an [allocation][], which means that all tasks in the same allocation run in the same client and share common resources, such as disk and networking. Allocations can request access to network resources, such as ports, using the [`network`][jobspec_network] block. At its simplest configuration, a `network` block can be defined as: ```hcl job "..." { # ... group "..." { network { port "http" {} } # ... } } ``` Nomad reserves a random port in the client between [`min_dynamic_port`][] and [`max_dynamic_port`][] that has not been allocated yet and creates a port mapping from the host network interface to the allocation. [![Nomad Port Mapping](/img/networking/port_mapping.png)](/img/networking/port_mapping.png) The selected port number can be accessed by tasks using the [`NOMAD_PORT_