> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Network Health

> Check your machine's network against what Vast expects, find what has drifted, and lock down the network your machines sit on.

Networks drift out of spec without anything appearing to break. A cable
renegotiates down to a lower speed, a reboot moves the machine to a new LAN
address, a router firmware update drops part of the port range. The machine
stays online and keeps taking rentals while renters get slow transfers and
ports that do not connect.

Vast expects the following from every machine's network. The first four rows
are the network rows of the
[verification requirements](https://docs.vast.ai/host/verification-stages.md); the last two are what
keeps a machine meeting them.

| | Requirement |
| - | - |
| **Bandwidth** | 500 Mbps down and 500 Mbps up per machine, measured on the machine. Machines sharing a line need that much each, at the same time. |
| **Connection** | Wired Ethernet, negotiated at the NIC's rated speed and full duplex. Fiber recommended. |
| **Public IPv4** | An address that is yours. CGNAT and addresses shared with other customers cannot host. |
| **Ports** | At least 5 per GPU, 100 per GPU recommended, forwarded for TCP and UDP to a LAN address that does not change. |
| **Outbound** | Unrestricted. Renter images and jobs download from anywhere. |
| **Stability** | No sustained packet loss, and DNS that keeps working when one resolver stops answering. |

This page tells you what to look at rather than how to configure every router
and switch. The output of these checks, plus the make and model of your
equipment, is what you need to work out a fix with its manual or an AI
assistant.

The steps are the same on Ubuntu Server 22.04 and 24.04.

For a machine that has dropped off the platform entirely, start with
[Offline Machine](https://docs.vast.ai/host/machine-offline.md).

> [!NOTE]
>
> Steps 1 and 2 only read state and are safe with rentals running. Step 3 fills
> the line while it runs, and step 4 needs a port no instance is using. The fixes
> these checks lead to are listed under Changes that interrupt rentals, at the
> end of this page.

## 1. Check the platform's view

Your machine's card under **Host → Machines** shows the upload speed, download
speed, and port count Vast has measured. Those are the numbers that count. If
any of them is missing, fix that first: a machine with missing data there fails
the self-test as not rentable.

The self-test then checks speed, stability, and open ports directly:

```bash theme={null}
vastai self-test machine <machine_id>
```

See [How to Self-Test](https://docs.vast.ai/host/how-to-self-test.md) for when to run it and how to
read the result. The steps below tell you why a number is wrong, and catch
drift between self-tests.

## 2. Check the machine

Run this on the machine:

```bash theme={null}
NIC=$(ip -o route get 1.1.1.1 | grep -oP 'dev \K\S+'); echo "Interface: $NIC"; \
sudo ethtool "$NIC" | grep -E 'Speed|Duplex'; \
ip -4 addr show "$NIC" | grep inet; \
curl -4 -s ifconfig.me; echo; \
nvidia-smi -L | wc -l; \
sysctl net.ipv4.ip_local_port_range; \
resolvectl dns; \
ping -c 50 -i 0.2 1.1.1.1 | grep loss; \
curl -s -o /dev/null -w 'console.vast.ai: %{http_code}\n' https://console.vast.ai
```

```
Interface: enp1s0
	Speed: 10000Mb/s
	Duplex: Full
    inet 192.168.1.50/24 metric 100 brd 192.168.1.255 scope global dynamic enp1s0
198.51.100.7
8
net.ipv4.ip_local_port_range = 32768	60999
Global:
Link 2 (enp1s0): 192.168.1.1 1.1.1.1
50 packets transmitted, 50 received, 0% packet loss, time 9813ms
console.vast.ai: 200
```

| Output | Good | If not |
| - | - | - |
| `Interface` | A wired port, usually `en…` or `eth…` | Move the machine to wired Ethernet |
| `Speed`, `Duplex` | Your NIC and switch's rated speed, and `Full` | Reseat, then swap the cable, switch port, or transceiver |
| `inet` | Not `dynamic`, or `dynamic` with a DHCP reservation on your router | Reserve the address on the router, or set a static one |
| Public IPv4 | The same as your router's WAN address | Ask your ISP for a public IPv4 address |
| GPU count | Your forwarded range is at least 5 x this, ideally 100 x | Widen the range |
| `ip_local_port_range` | No overlap with your forwarded range | Move your range, or reserve it with `net.ipv4.ip_local_reserved_ports` |
| `resolvectl dns` | Two or more servers | Add a public resolver such as `1.1.1.1` |
| `packet loss` | `0%` | Find the hop with `mtr`, below |
| `console.vast.ai` | Any number | Remove the outbound filtering |

A name starting `wl` is Wi-Fi, which does not qualify however fast it tests. A
bond, VLAN, or VPN interface (`bond0`, `enp1s0.100`, `wg0`) has no link of its
own, so run the `ethtool` line against each of its physical ports instead.

A lower speed or `Half` duplex is a physical fault. Change one part at a time,
so you know which one it was.

`dynamic` means the address is a DHCP lease. Without a reservation, a reboot can
hand the machine a new address while your forwarding rule still points at the
old one. A static address must sit outside the router's DHCP pool.

A public address that differs from your router's WAN address means NAT you do
not control. A router WAN address inside `100.64.0.0/10` is CGNAT. Neither can
host.

A range that has to grow is two changes: widen the rule on your router, then
update the range as described in the
[host setup guide](https://cloud.vast.ai/host/setup/).

A forwarded range that overlaps `ip_local_port_range` makes rentals fail to
start at random, because the machine's own outbound connections take ports an
instance needs.

A single DNS server, usually your router, can take the machine offline on its
own.

`000` from `console.vast.ai` means the machine could not connect, so something
is filtering its outbound traffic.

For link errors, open the **Network** tab in
[Machine Metrics](https://docs.vast.ai/host/machine-metrics.md). It charts RX and TX errors and drops
per sample, so a healthy interface reads a flat zero. Errors that keep
appearing point at a cable, transceiver, or switch port long before the link
fails.

To find where packet loss starts:

```bash theme={null}
sudo apt-get update && \
sudo apt-get install -y mtr-tiny && \
mtr -r -c 100 1.1.1.1
```

Loss that starts at one hop and carries through to the last line is real. Loss
at a single hop that is gone by the next one is that router deprioritizing its
own replies, and is not affecting traffic.

## 3. Test the line

> [!WARNING]
>
> A speed test fills the line while it runs, and renters on the machine slow
> down with it. Run it while the machine is idle, or inside a
> [maintenance window](https://docs.vast.ai/host/set-maintenance-window.md).

Measure from the machine itself, not from a laptop on the same network.

```bash theme={null}
sudo apt-get update && \
sudo apt-get install -y speedtest-cli && \
speedtest-cli --secure
```

```
Retrieving speedtest.net configuration...
Testing from Example ISP (198.51.100.7)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Example Host (City) [12.34 km]: 8.129 ms
Testing download speed................................................................................
Download: 942.31 Mbit/s
Testing upload speed......................................................................................................
Upload: 918.44 Mbit/s
```

Both directions must reach 500 Mbps. Upload is the one that usually fails: a
line sold as 1 Gbps is often 1000 down and 50 up. Test at a busy hour as well
as at night, because the evening figure is the one renters get.

`speedtest-cli` can under-read fast lines. On a gigabit line or faster, confirm
the figure with `iperf3` against a public iperf3 server.

Renters move large models and datasets in both directions. If your contract has
a data cap or fair-use limit, expect to hit it.

## 4. Test the ports from outside

Test the lowest and the highest port in your range, over TCP and over UDP, from
a different network such as a phone hotspot or a VPS. A test from inside your
own network proves nothing, because your router can treat its own public
address differently from the internet.

If you run a host firewall, allow the range in it first, because the test
listener goes through it.

On the machine, as your normal user and on a port no instance is using:

```bash theme={null}
nc -l <port>
```

From the outside connection:

```bash theme={null}
nc -v <your public IPv4 address> <port>
```

```
Connection to 198.51.100.7 61000 port [tcp/*] succeeded!
```

Type a line and press Enter. It should appear on the machine, which proves the
connection arrived. Press Ctrl-C on both ends. Then repeat with `-u` added to
both commands to test UDP. UDP has no handshake, so the line appearing on the
machine is the only proof.

| Result | Meaning |
| - | - |
| Both ends connect | The whole range is forwarded |
| Lowest connects, highest does not | The rule on your router is narrower than your range |
| Neither connects | The rule is gone, or it points at a LAN address the machine no longer has |

***

## Several machines on one network

Every machine still needs its own 500 Mbps each way. Once machines share a line,
they share everything between them and the internet, and the network gets worse
as you add machines without any one of them changing.

* **The uplink.** It needs 500 Mbps x the number of machines in each direction,
  so six machines need 3 Gbps symmetric. Measure it by running speed tests on
  every machine at once. If the total stops rising as you add machines, the
  uplink is full.
* **The link between your switch and your router.** This is usually the real
  bottleneck, not the ISP line. Eight machines behind a 1 Gb switch uplink share
  1 Gb, about 125 Mbps each under load. Use a faster uplink, or aggregate
  several links (LACP). Aggregation adds capacity across many connections, but
  any single connection still tops out at the speed of one member link.
* **Cables on every machine.** One machine with a bad cable floods the shared
  switch with retransmits and slows its neighbors. Check link speed and errors
  on all of them, not just the slow one.
* **Port ranges.** One public IPv4 address is one set of ports. Give each
  machine its own range, sized to its GPU count, with no overlaps and room to
  grow. Keep each machine's range and LAN address written down together, and
  test that each range reaches the right machine.
* **The router.** Every renter connection is an entry in the router's NAT
  table. Consumer routers run out at fleet scale and start dropping new
  connections while existing ones keep working. Some also cap the number of
  forwarding rules they can hold.

Adding a machine divides the uplink again and uses more of the port space, so
re-check the whole fleet afterwards.

***

## Security baseline

Renters run their own code on your machines, with network access. Set up the
network on that assumption.

* **Isolate the hosting machines.** Put them on their own VLAN or behind their
  own router, away from personal computers, NAS boxes, cameras, and anything
  else on your home or office network.
* **Forward only what hosting needs.** That is the port range, plus SSH if you
  manage the machine from outside. Never use a router's DMZ host or "forward all
  ports" setting. Turn off UPnP on the router: Vast does not use it, and it lets
  anything on your network open ports to the internet.
* **Keep management interfaces off the internet.** BMC consoles (IPMI, iDRAC,
  iLO) and router and switch admin pages should be reachable only from your own
  network or a VPN, never forwarded, and never left on default passwords.
* **SSH keys only, a different key for each machine.** Both are verification
  requirements; see [Disable SSH Password Login](https://docs.vast.ai/host/disable-ssh-password-login.md).
  Limit SSH to the addresses you connect from, or reach it over a VPN. A VPN on
  the machine must not become its default route, because renters have to reach
  the machine on its own public address.
* **Keep router and switch firmware current.** Update inside a maintenance
  window, and re-test the port range afterwards. A firmware update is the most
  common way forwarding rules get lost.
* **A host firewall is optional.** If you run one, allow SSH and your range
  inbound and leave outbound open. Never flush the machine's firewall rules
  (`iptables -F`, `nft flush ruleset`): Docker and the Vast daemon install
  their own, and instances break without them.

***

## Changes that interrupt rentals

Apart from the speed test, the checks on this page only read state. The fixes
they lead to do not. Schedule a
[maintenance window](https://docs.vast.ai/host/set-maintenance-window.md) at least **48 hours** ahead
for any of these:

| Change | What it interrupts |
| - | - |
| A speed test | Transfers for every renter on the machine |
| Changing the machine's LAN address or netplan config | The machine's network, and every instance on it |
| Changing the forwarded port range | Instances using ports in the old range |
| Reseating or replacing a cable, or moving a switch port | That machine |
| Router or switch firmware, reboot, or rule changes | Every machine behind it |

> [!TIP]
>
> Apply netplan changes with `sudo netplan try` when you are connected over SSH.
> It rolls the change back automatically unless you confirm it, so a mistake does
> not lock you out.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.