netavark(1)() netavark(1)()

# [NAME](#NAME)

netavark - Configure a given network namespace for use by a container

# [SYNOPSIS](#SYNOPSIS)

**netavark** \[*options*] *command* *network namespace path*

# [DESCRIPTION](#DESCRIPTION)

Netavark configures a network namespace according to a configuration read from STDIN. The configuration is JSON formatted.

# [GLOBAL OPTIONS](#GLOBAL_OPTIONS)

## **--file**, **-f**

Instead of reading from STDIN, read the configuration to be applied from the given file. **-f -** may also be used to flag reading from STDIN.

# [COMMANDS](#COMMANDS)

## [netavark create](#netavark_create)

The create command takes a partially configured network and completes the remaining configuration. The create command input is describled in netavark-create-input.md ⟨https://github.com/containers/netavark/blob/main/docs/netavark-create-input.md⟩. The output of the create command is a network config json.

## [netavark setup](#netavark_setup)

The setup command configures the given network namespace with the given configuration, creating any interfaces and firewall rules necessary.

## [netavark teardown](#netavark_teardown)

The teardown command is the inverse of the setup command, undoing any configuration applied. Some interfaces may not be deleted (bridge interfaces, for example, will not be removed).

## [CONFIGURATION FORMAT](#CONFIGURATION_FORMAT)

The configuration accepted is the same for both setup and teardown. It is JSON formatted.

Format is https://github.com/containers/podman/blob/cd7b48198c38c5028540e85dc72dd3406f4318f0/libpod/network/types/network.go#L164-L173 but we will also send a Networks array including all the network definitions (https://github.com/containers/podman/blob/cd7b48198c38c5028540e85dc72dd3406f4318f0/libpod/network/types/network.go#L32-L62) TODO: Transcribe configuration into here in a nice tabular format

# [EXAMPLE](#EXAMPLE)

netavark setup /run/user/1000/podman/netns/d11d1f9c499d

netavark -f /run/podman/828b0508ae64.conf teardown /run/podman/netns/828b0508ae64

# [SEE ALSO](#SEE_ALSO)

[podman(1)](/man/os/netavark/podman.1)

# [HISTORY](#HISTORY)

September 2021, Originally compiled by Matt Heon mheon@redhat.com ⟨mailto:mheon@redhat.com⟩

---

Document: netavark(1) from netavark 2.1.0-r2 (Chainguard OS)
Source: https://github.com/containers/netavark
