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= option. In the case of  Macvlan  connec‐
18       tions, the CNI dhcp plugin needs to be activated or the container image
19       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 (default "bridge").  Currently only bridge
39       is supported.
40
41
42   --opt=option, -o
43       Set driver specific options.
44
45
46       For  the  bridge  driver  the  following options are supported: mtu and
47       vlan.  The mtu option sets the  Maximum  Transmission  Unit  (MTU)  and
48       takes  an  integer  value.  The vlan option assign VLAN tag and enables
49       vlan_filtering. Defaults to none.
50
51
52   --gateway
53       Define a gateway for the subnet. If  you  want  to  provide  a  gateway
54       address, you must also provide a subnet option.
55
56
57   --internal
58       Restrict  external access of this network. Note when using this option,
59       the dnsname plugin will be automatically disabled.
60
61
62   --ip-range
63       Allocate container IP from a range.  The range must be a complete  sub‐
64       net and in CIDR notation.  The ip-range option must be used with a sub‐
65       net option.
66
67
68   --label
69       Set metadata for a network (e.g., --label mykey=value).
70
71
72   --macvlan
73       This option is being deprecated
74
75
76       Create a Macvlan based connection rather than a  classic  bridge.   You
77       must pass an interface name from the host for the Macvlan connection.
78
79
80   --subnet
81       The subnet in CIDR notation.
82
83
84   --ipv6
85       Enable  IPv6  (Dual Stack) networking. You must pass a IPv6 subnet. The
86       subnet option must be used with the ipv6 option.
87
88

EXAMPLE

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

SEE ALSO

143       podman(1), podman-network(1), podman-network-inspect(1)
144
145

HISTORY

147       August 2019,  Originally  compiled  by  Brent  Baude  bbaude@redhat.com
148       ⟨mailto:bbaude@redhat.com⟩
149
150
151
152                                                    podman-network-create(1)()
Impressum