1podman-network-create(1)    General Commands Manual   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 network configuration for use with Podman. By default, Podman
15       creates a bridge connection.  A Macvlan connection can be created  with
16       the  -d  macvlan  option. A parent device for macvlan can be designated
17       with the -o parent=<device> option.
18
19
20       If no options are provided, Podman will assign a free subnet  and  name
21       for your network.
22
23
24       Upon  completion  of creating the network, Podman will display the name
25       of the newly added network.
26
27

OPTIONS

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

EXAMPLE

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

SEE ALSO

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

HISTORY

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