NAME
podman-network-create - Create a Podman networkSYNOPSIS
podman network create [options] [name]DESCRIPTION
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= <device> option.OPTIONS
--disable-dns
Disables the DNS plugin for this network which if enabled, can perform container to container name resolution.--driver, -d
Driver to manage the network. Currently bridge, macvlan and ipvlan are supported. Defaults to bridge. As rootless the macvlan and ipvlan driver have no access to the host network interfaces because rootless networking requires a separate network namespace.--gateway
Define a gateway for the subnet. If you want to provide a gateway address, you must also provide a subnet option. Can be specified multiple times. The argument order of the --subnet, --gateway and --ip-range options must match.--internal
Restrict external access of this network. Note when using this option, the dnsname plugin will be automatically disabled.--ip-range
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.--ipam-driver=driver
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:- host-local: IP addresses are assigned locally.
- dhcp: IP addresses are assigned from a dhcp server on your network. This driver is not yet supported with netavark. For CNI the dhcp plugin needs to be activated before.
- none: No ip addresses are assigned to the interfaces.
--ipv6
Enable IPv6 (Dual Stack) networking. If not subnets are given it will allocate a ipv4 and ipv6 subnet.--label
Set metadata for a network (e.g., --label mykey=value).--opt, -o=option
Set driver specific options.- Supported values for macvlan are bridge, private, vepa, passthru. Defaults to bridge.
- Supported values for ipvlan are l2, l3, l3s. Defaults to l2.
--subnet
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.EXAMPLE
Create a network with no options.$ podman network create podman2
$ podman network create --subnet 192.5.0.0/16 newnet newnet
$ podman network create --subnet 2001:db8::/64 --ipv6 newnetv6 newnetv6
$ podman network create --subnet 192.168.33.0/24 --gateway 192.168.33.3 newnet newnet
$ podman network create --subnet 192.168.55.0/24 --ip-range 192.168.55.128/25 podman5
$ 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
# podman network create -d macvlan -o parent=eth0 --subnet 192.5.0.0/16 newnet newnet