.nh .TH podman\-network\-create(1) .SH NAME .PP podman\-network\-create \- Create a Podman CNI network .SH SYNOPSIS .PP \fBpodman network create\fP [\fIoptions\fP] name .SH DESCRIPTION .PP Create a CNI\-network configuration for use with Podman. By default, Podman creates a bridge connection. A \fIMacvlan\fP connection can be created with the \fI\-d macvlan\fP option. A parent device for macvlan can be designated with the \fI\-o parent=\fP option. In the case of \fIMacvlan\fP connections, the CNI \fIdhcp\fP plugin needs to be activated or the container image must have a DHCP client to interact with the host network's DHCP server. .PP If no options are provided, Podman will assign a free subnet and name for your network. .PP Upon completion of creating the network, Podman will display the path to the newly added network file. .SH OPTIONS .SS \fB\-\-disable\-dns\fP .PP Disables the DNS plugin for this network which if enabled, can perform container to container name resolution. .SS \fB\-\-driver\fP, \fB\-d\fP .PP Driver to manage the network (default "bridge"). Currently only \fB\fCbridge\fR is supported. .SS \fB\-\-opt\fP=\fIoption\fP, \fB\-o\fP .PP Set driver specific options. .PP For the \fB\fCbridge\fR driver the following options are supported: \fB\fCmtu\fR and \fB\fCvlan\fR\&. The \fB\fCmtu\fR option sets the Maximum Transmission Unit (MTU) and takes an integer value. The \fB\fCvlan\fR option assign VLAN tag and enables vlan\_filtering. Defaults to none. .SS \fB\-\-gateway\fP .PP Define a gateway for the subnet. If you want to provide a gateway address, you must also provide a \fIsubnet\fP option. .SS \fB\-\-internal\fP .PP Restrict external access of this network. Note when using this option, the dnsname plugin will be automatically disabled. .SS \fB\-\-ip\-range\fP .PP Allocate container IP from a range. The range must be a complete subnet and in CIDR notation. The \fIip\-range\fP option must be used with a \fIsubnet\fP option. .SS \fB\-\-label\fP .PP Set metadata for a network (e.g., \-\-label mykey=value). .SS \fB\-\-macvlan\fP .PP \fIThis option is being deprecated\fP .PP Create a \fIMacvlan\fP based connection rather than a classic bridge. You must pass an interface name from the host for the Macvlan connection. .SS \fB\-\-subnet\fP .PP The subnet in CIDR notation. .SS \fB\-\-ipv6\fP .PP Enable IPv6 (Dual Stack) networking. You must pass a IPv6 subnet. The \fIsubnet\fP option must be used with the \fIipv6\fP option. .SH EXAMPLE .PP Create a network with no options .PP .RS .nf # podman network create /etc/cni/net.d/cni\-podman\-4.conflist .fi .RE .PP Create a network named \fInewnet\fP that uses \fI192.5.0.0/16\fP for its subnet. .PP .RS .nf # podman network create \-\-subnet 192.5.0.0/16 newnet /etc/cni/net.d/newnet.conflist .fi .RE .PP Create an IPv6 network named \fInewnetv6\fP, you must specify the subnet for this network, otherwise the command will fail. For this example, we use \fI2001:db8::/64\fP for its subnet. .PP .RS .nf # podman network create \-\-subnet 2001:db8::/64 \-\-ipv6 newnetv6 /etc/cni/net.d/newnetv6.conflist .fi .RE .PP Create a network named \fInewnet\fP that uses \fI192.168.33.0/24\fP and defines a gateway as \fI192.168.133.3\fP .PP .RS .nf # podman network create \-\-subnet 192.168.33.0/24 \-\-gateway 192.168.33.3 newnet /etc/cni/net.d/newnet.conflist .fi .RE .PP Create a network that uses a *192.168.55.0/24** subnet and has an IP address range of \fI192.168.55.129 \- 192.168.55.254\fP\&. .PP .RS .nf # podman network create \-\-subnet 192.168.55.0/24 \-\-ip\-range 192.168.55.128/25 /etc/cni/net.d/cni\-podman\-5.conflist .fi .RE .PP Create a Macvlan based network using the host interface eth0 .PP .RS .nf # podman network create \-d macvlan \-o parent=eth0 newnet /etc/cni/net.d/newnet.conflist .fi .RE .SH SEE ALSO .PP podman(1), podman\-network(1), podman\-network\-inspect(1) .SH HISTORY .PP August 2019, Originally compiled by Brent Baude bbaude@redhat.com \[la]mailto:bbaude@redhat.com\[ra]