1podman-network-create(1)()                          podman-network-create(1)()
2
3
4

NAME

6       podman-network-create - Create a Podman network
7
8

SYNOPSIS

10       podman network create  [options] name
11
12

DESCRIPTION

14       Create  a  CNI-network  configuration  for use with Podman. By default,
15       Podman creates a bridge connection.  A Macvlan connection can  be  cre‐
16       ated  with  the  -d  macvlan option. A parent device for macvlan can be
17       designated with the -o parent=<device> option. In the case  of  Macvlan
18       connections, the CNI dhcp plugin needs to be activated or the container
19       image must have a DHCP client to interact with the host network's  DHCP
20       server.
21
22
23       If  no  options are provided, Podman will assign a free subnet and name
24       for your network.
25
26
27       Upon completion of creating the network, Podman will display  the  name
28       of the newly added network.
29
30

OPTIONS

32   --disable-dns
33       Disables  the DNS plugin for this network which if enabled, can perform
34       container to container name resolution.
35
36
37   --driver, -d
38       Driver to manage the network. Currently bridge, macvlan and ipvlan  are
39       supported.  Defaults  to  bridge.   As  rootless the macvlan and ipvlan
40       driver have no access to the host network interfaces  because  rootless
41       networking requires a separate network namespace.
42
43
44       Special  considerations  for the netavark backend: - The macvlan driver
45       requires the --subnet option, DHCP is currently not supported.   -  The
46       ipvlan driver is not currently supported.
47
48
49   --gateway
50       Define  a  gateway for the subnet. If you want to provide a gateway ad‐
51       dress, you must also provide a subnet option. Can be specified multiple
52       times.   The  argument  order of the --subnet, --gateway and --ip-range
53       options must match.
54
55
56   --internal
57       Restrict external access of this network. Note when using this  option,
58       the dnsname plugin will be automatically disabled.
59
60
61   --ip-range
62       Allocate  container IP from a range.  The range must be a complete sub‐
63       net and in CIDR notation.  The ip-range option must be used with a sub‐
64       net option. Can be specified multiple times.  The argument order of the
65       --subnet, --gateway and --ip-range options must match.
66
67
68   --ipam-driver=driver
69       Set the ipam driver (IP Address Management  Driver)  for  the  network.
70       When unset podman will choose an ipam driver automatically based on the
71       network driver. Valid values are:
72        - host-local: IP addresses are assigned locally.
73        - dhcp: IP addresses are assigned from a dhcp server on your  network.
74       This driver is not yet supported with netavark.
75        - none: No ip addresses are assigned to the interfaces.
76
77
78       You  can  see the driver in the podman network inspect output under the
79       ipam_options field.
80
81
82   --ipv6
83       Enable IPv6 (Dual Stack) networking. If not subnets are given  it  will
84       allocate a ipv4 and ipv6 subnet.
85
86
87   --label
88       Set metadata for a network (e.g., --label mykey=value).
89
90
91   --opt=option, -o
92       Set driver specific options.
93
94
95       All  drivers  accept  the  mtu  option. The mtu option sets the Maximum
96       Transmission Unit (MTU) and takes an integer value.
97
98
99       Additionally the bridge driver supports the following option:  -  vlan:
100       This  option  assign  VLAN  tag and enables vlan_filtering. Defaults to
101       none.
102
103
104       The macvlan and ipvlan driver support the following options: -  parent:
105       The  host  device  which  should be used for the macvlan interface. De‐
106       faults to the default route interface.  - mode: This  option  sets  the
107       specified ip/macvlan mode on the interface.
108         -  Supported  values for macvlan are bridge, private, vepa, passthru.
109       Defaults to bridge.
110         - Supported values for ipvlan are l2, l3, l3s. Defaults to l2.
111
112
113   --subnet
114       The subnet in CIDR notation. Can be specified multiple times  to  allo‐
115       cate  more than one subnet for this network.  The argument order of the
116       --subnet, --gateway and --ip-range options must match.  This is  useful
117       to set a static ipv4 and ipv6 subnet.
118
119

EXAMPLE

121       Create a network with no options.
122
123
124              $ podman network create
125              cni-podman2
126
127
128
129       Create a network named newnet that uses 192.5.0.0/16 for its subnet.
130
131
132              $ podman network create --subnet 192.5.0.0/16 newnet
133              newnet
134
135
136
137       Create an IPv6 network named newnetv6 with a subnet of 2001:db8::/64.
138
139
140              $ podman network create --subnet 2001:db8::/64 --ipv6 newnetv6
141              newnetv6
142
143
144
145       Create  a  network named newnet that uses 192.168.33.0/24 and defines a
146       gateway as 192.168.133.3.
147
148
149              $ podman network create --subnet 192.168.33.0/24 --gateway 192.168.33.3 newnet
150              newnet
151
152
153
154       Create a network that uses a *192.168.55.0/24** subnet and  has  an  IP
155       address range of 192.168.55.129 - 192.168.55.254.
156
157
158              $ podman network create --subnet 192.168.55.0/24 --ip-range 192.168.55.128/25
159              cni-podman5
160
161
162
163       Create a network with a static ipv4 and ipv6 subnet and set a gateway.
164
165
166              $ 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
167              podman4
168
169
170
171       Create  a  Macvlan based network using the host interface eth0. Macvlan
172       networks can only be used as root.
173
174
175              # podman network create -d macvlan -o parent=eth0 --subnet 192.5.0.0/16 newnet
176              newnet
177
178
179

SEE ALSO

181       podman(1),  podman-network(1),  podman-network-inspect(1),  podman-net‐
182       work-ls(1)
183
184

HISTORY

186       August  2021,  Updated  with  the  new network format by Paul Holzinger
187       pholzing@redhat.com ⟨mailto:pholzing@redhat.com⟩
188
189
190       August 2019,  Originally  compiled  by  Brent  Baude  bbaude@redhat.com
191       ⟨mailto:bbaude@redhat.com⟩
192
193
194
195                                                    podman-network-create(1)()
Impressum