podman-network(1)
β¨ NAME β¨
podman-network β manage Podman networks, bestie π
π¦ SYNOPSIS π¦
podman network subcommand
πΈ DESCRIPTION πΈ
Okay so the network command is literally the main character for managing networks in Podman. Periodt.
Podman uses Netavark as the network backend. No cap. π«Ά
π DNS NOTES π
On networks with DNS enabled β which is the default, unless --disable-dns is used β aardvark-dns registers each container under its name and aliases. Containers that share a pod network namespace are registered under the pod name. Slay. β¨
Here's the tea β:
- The container name is always registered.
- The short container ID (first
12characters) is always registered as an alias. - When
--hostnameis explicitly set, that hostname is also registered as an alias. - By default the hostname inside the container is the short ID, so it already matches the alias.
- Setting
container_name_as_hostname=truein the[containers]section ofcontainers.conf(5)changes the hostname only; DNS entries remain unchanged. Not me pointing that out twice β it's important, okay? π - Additional names can be set with the
alias=option in--network(e.g.,podman run --network mynet:alias=foo), with--network-alias, or with--aliasonpodman network connect. - Auto-generated names use an underscore between words, for example
exciting_chebyshev.
That's the whole DNS vibe check. Keep it in mind, iykyk. π§
π COMMANDS π
These are all the subcommands, bestie β every single one, no skips:
connectβpodman-network-connect(1): Connect a container to a network.createβpodman-network-create(1): Create a Podman network.disconnectβpodman-network-disconnect(1): Disconnect a container from a network.existsβpodman-network-exists(1): Check if the given network exists.inspectβpodman-network-inspect(1): Display the network configuration for one or more networks.lsβpodman-network-ls(1): Display a summary of networks.pruneβpodman-network-prune(1): Remove all unused networks.reloadβpodman-network-reload(1): Reload network configuration for containers.rmβpodman-network-rm(1): Remove one or more networks.updateβpodman-network-update(1): Update an existing Podman network.
Literally all of them. β¨π₯
π SUBNET NOTES π
Podman requires specific default IPs and, thus, network subnets. The default values used by Podman can be modified in the containers.conf(5) file. Big important energy. π
π Podman network π
The default bridge network (called podman) uses 10.88.0.0/16 as a subnet. When Podman runs as root, the podman network is used as default. It is the same as adding the option --network bridge or --network podman.
This subnet can be changed in containers.conf(5) under the [network] section. Set the default_subnet to any subnet that is free in the environment. The name of the default network can also be changed from podman to another name using the default network key.
β οΈ Note that this is only done when no containers are running. So don't try to be sneaky, bestie β shut those containers down first. π
π Pasta π
Pasta by default performs no Network Address Translation (NAT) and copies the IPs from your main interface into the container namespace. It's giving direct and unbothered. π
If pasta cannot find an interface with the default route, it will select an interface if there is only one interface with a valid route. If you do not have a default route and several interfaces have defined routes, pasta will be unable to figure out the correct interface and it will fail to start. Not dramatic β just facts. π
To specify the interface, use -i option to pasta. A default set of pasta options can be set in containers.conf(5) under the [network] section with the pasta_options key.
Pasta is the default rootless networking tool. Iconic. π
π¦ Podman network create π¦
When a new network is created with a podman network create command, and no subnet is given with the --subnet option, Podman starts picking a free subnet from 10.89.0.0/24 to 10.255.255.0/24. Use the default_subnet_pools option under the [network] section in containers.conf(5) to change the range and/or size that is assigned by default.
That's the subnet selection process β automatic but configurable. No cap. πΈ
β SEE ALSO β
podman(1), podman-network-create(1), containers.conf(5) β go read them, bestie, they're literally linked. πβ¨
π That's the entire podman-network(1) page from the General Commands Manual β go forth and manage those networks, bestie! You're gonna slay. π
β¨
π¦ where this page comes from
- arch rolling: podman 6.1.4-1 Β· Apache-2.0
- centos-stream 10: podman 7:6.1.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: podman 6.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms