podman-network-create - Create a Podman network
podman network create [options] [name]
Create a network configuration for use with Podman. By default, Podman creates a bridge connection.
A Macvlan connection can be created with the -d macvlan option. A parent device for macvlan can
be designated with the -o parent=
If no options are provided, Podman will assign a free subnet and name for the network.
Upon completion of creating the network, Podman will display the name of the newly added network.
NOTE: The support for the network name pasta is deprecated and will be removed in the next major release because it is used as a special network mode in podman run/create --network.
Disables the DNS plugin for this network which if enabled, can perform container to container name resolution.
Set network-scoped DNS resolver/nameserver for containers in this network. If not set, the host servers from
/etc/resolv.conf will be used. It can be overwritten on the container level with the
podman run/create --dns option. This option can be specified multiple times to set more than one IP.
Driver to manage the network. Currently
ipvlan are supported. Defaults to
As rootless the
ipvlan driver have no access to the host network interfaces because rootless networking requires a separate network namespace.
Special considerations for the netavark backend:
macvlandriver requires the
--subnetoption, DHCP is currently not supported.
ipvlandriver is not currently supported.
Define a gateway for the subnet. To provide a gateway address, a subnet option is required. Can be specified multiple times. The argument order of the --subnet, --gateway and --ip-range options must match.
Ignore the create request if a network with the same name already exists instead of failing. Note, trying to create a network with an existing name and different parameters, will not change the configuration of the existing one
Restrict external access of this network. Note when using this option, the dnsname plugin will be automatically disabled.
Allocate container IP from a range. The range must be a complete subnet and in CIDR notation. The ip-range option must be used with a subnet option. Can be specified multiple times. The argument order of the --subnet, --gateway and --ip-range options must match.
Set the ipam driver (IP Address Management Driver) for the network. When unset podman will choose an ipam driver automatically based on the network driver.
Valid values are:
dhcp: IP addresses are assigned from a dhcp server on the network. This driver is not yet supported with netavark. For CNI the dhcp plugin needs to be activated before.
host-local: IP addresses are assigned locally.
none: No ip addresses are assigned to the interfaces.
View the driver in the podman network inspect output under the
Enable IPv6 (Dual Stack) networking. If not subnets are given it will allocate an ipv4 and an ipv6 subnet.
Set metadata for a network (e.g., --label mykey=value).
Set driver specific options.
All drivers accept the
mtu: Sets the Maximum Transmission Unit (MTU) and takes an integer value.
metricSets the Route Metric for the default route created in every container joined to this network. Accepts a positive integer value. Can only be used with the Netavark network backend.
bridge driver supports the following options:
vlan: This option assign VLAN tag and enables vlan_filtering. Defaults to none.
isolate: This option isolates networks by blocking traffic between those that have this option enabled.
com.docker.network.bridge.name: This option assigns the given name to the created Linux Bridge
com.docker.network.driver.mtu: Sets the Maximum Transmission Unit (MTU) and takes an integer value.
ipvlan driver support the following options:
parent: The host device which should be used for the macvlan interface. Defaults to the default route interface.
mode: This option sets the specified ip/macvlan mode on the interface.
Supported values for
passthru. Defaults to
Supported values for
l3s. Defaults to
The subnet in CIDR notation. Can be specified multiple times to allocate more than one subnet for this network. The argument order of the --subnet, --gateway and --ip-range options must match. This is useful to set a static ipv4 and ipv6 subnet.
Create a network with no options.
$ podman network create podman2
Create a network named newnet that uses 18.104.22.168/16 for its subnet.
$ podman network create --subnet 22.214.171.124/16 newnet newnet
Create an IPv6 network named newnetv6 with a subnet of 2001:db8::/64.
$ podman network create --subnet 2001:db8::/64 --ipv6 newnetv6 newnetv6
Create a network named newnet that uses 192.168.33.0/24 and defines a gateway as 192.168.133.3.
$ podman network create --subnet 192.168.33.0/24 --gateway 192.168.33.3 newnet newnet
Create a network that uses a 192.168.55.0/24* subnet and has an IP address range of 192.168.55.129 - 192.168.55.254.
$ podman network create --subnet 192.168.55.0/24 --ip-range 192.168.55.128/25 podman5
Create a network with a static ipv4 and ipv6 subnet and set a gateway.
$ podman network create --subnet 192.168.55.0/24 --gateway 192.168.55.3 --subnet fd52:2a5a:747e:3acd::/64 --gateway fd52:2a5a:747e:3acd::10 podman4
Create a Macvlan based network using the host interface eth0. Macvlan networks can only be used as root.
$ sudo podman network create -d macvlan -o parent=eth0 --subnet 126.96.36.199/16 newnet newnet
podman(1), podman-network(1), podman-network-inspect(1), podman-network-ls(1)
August 2021, Updated with the new network format by Paul Holzinger firstname.lastname@example.org
August 2019, Originally compiled by Brent Baude email@example.com