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

NAME

6       podman-network-create - Create a Podman CNI 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  path
28       to the newly added network file.
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  and  macvlan  is  sup‐
39       ported.  Defaults to bridge.  As rootless the macvlan driver has no ac‐
40       cess to the host network interfaces  because  rootless  networking  re‐
41       quires a separate network namespace.
42
43
44   --opt=option, -o
45       Set driver specific options.
46
47
48       For  the  bridge  driver  the  following options are supported: mtu and
49       vlan.  The mtu option sets the  Maximum  Transmission  Unit  (MTU)  and
50       takes  an  integer  value.  The vlan option assign VLAN tag and enables
51       vlan_filtering. Defaults to none.
52
53
54   --gateway
55       Define a gateway for the subnet. If you want to provide a  gateway  ad‐
56       dress, you must also provide a subnet option.
57
58
59   --internal
60       Restrict  external access of this network. Note when using this option,
61       the dnsname plugin will be automatically disabled.
62
63
64   --ip-range
65       Allocate container IP from a range.  The range must be a complete  sub‐
66       net and in CIDR notation.  The ip-range option must be used with a sub‐
67       net option.
68
69
70   --label
71       Set metadata for a network (e.g., --label mykey=value).
72
73
74   --subnet
75       The subnet in CIDR notation.
76
77
78   --ipv6
79       Enable IPv6 (Dual Stack) networking. You must pass a IPv6  subnet.  The
80       subnet option must be used with the ipv6 option.
81
82

EXAMPLE

84       Create a network with no options
85
86
87              # podman network create
88              /etc/cni/net.d/cni-podman-4.conflist
89
90
91
92       Create a network named newnet that uses 192.5.0.0/16 for its subnet.
93
94
95              # podman network create --subnet 192.5.0.0/16 newnet
96              /etc/cni/net.d/newnet.conflist
97
98
99
100       Create  an IPv6 network named newnetv6, you must specify the subnet for
101       this network, otherwise the command will fail.  For  this  example,  we
102       use 2001:db8::/64 for its subnet.
103
104
105              # podman network create --subnet 2001:db8::/64 --ipv6 newnetv6
106              /etc/cni/net.d/newnetv6.conflist
107
108
109
110       Create  a  network named newnet that uses 192.168.33.0/24 and defines a
111       gateway as 192.168.133.3
112
113
114              # podman network create --subnet 192.168.33.0/24 --gateway 192.168.33.3 newnet
115              /etc/cni/net.d/newnet.conflist
116
117
118
119       Create a network that uses a *192.168.55.0/24** subnet and  has  an  IP
120       address range of 192.168.55.129 - 192.168.55.254.
121
122
123              # podman network create --subnet 192.168.55.0/24 --ip-range 192.168.55.128/25
124              /etc/cni/net.d/cni-podman-5.conflist
125
126
127
128       Create a Macvlan based network using the host interface eth0
129
130
131              # podman network create -d macvlan -o parent=eth0 newnet
132              /etc/cni/net.d/newnet.conflist
133
134
135

SEE ALSO

137       podman(1), podman-network(1), podman-network-inspect(1)
138
139

HISTORY

141       August  2019,  Originally  compiled  by  Brent  Baude bbaude@redhat.com
142       ⟨mailto:bbaude@redhat.com⟩
143
144
145
146                                                    podman-network-create(1)()
Impressum