1podman-network-create(1)() podman-network-create(1)()
2
3
4
6 podman-network-create - Create a Podman CNI network
7
8
10 podman network create [options] name
11
12
14 Create a CNI-network configuration for use with Podman. By default,
15 Podman creates a bridge connection. A Macvlan connection can be created
16 with the macvlan option. In the case of Macvlan connections, the CNI
17 dhcp plugin needs to be activated or the container image must have a
18 DHCP client to interact with the host network's DHCP server.
19
20
21 If no options are provided, Podman will assign a free subnet and name
22 for your network.
23
24
25 Upon completion of creating the network, Podman will display the path
26 to the newly added network file.
27
28
30 --disable-dns
31
32
33 Disables the DNS plugin for this network which if enabled, can perform
34 container to container name resolution.
35
36
37 -d, --driver
38
39
40 Driver to manage the network (default "bridge"). Currently on bridge
41 is supported.
42
43
44 --gateway
45
46
47 Define a gateway for the subnet. If you want to provide a gateway
48 address, you must also provide a subnet option.
49
50
51 --internal
52
53
54 Restrict external access of this network
55
56
57 --ip-range
58
59
60 Allocate container IP from a range. The range must be a complete sub‐
61 net and in CIDR notation. The ip-range option must be used with a sub‐
62 net option.
63
64
65 --macvlan
66
67
68 Create a Macvlan based connection rather than a classic bridge. You
69 must pass an interface name from the host for the Macvlan connection.
70
71
72 --subnet
73
74
75 The subnet in CIDR notation.
76
77
79 Create a network with no options
80
81
82 # podman network create
83 /etc/cni/net.d/cni-podman-4.conflist
84
85
86
87 Create a network named newnet that uses 192.5.0.0/16 for its subnet.
88
89
90 # podman network create --subnet 192.5.0.0/16 newnet
91 /etc/cni/net.d/newnet.conflist
92
93
94
95 Create a network named newnet that uses 192.168.33.0/24 and defines a
96 gateway as 192.168.133.3
97
98
99 # podman network create --subnet 192.168.33.0/24 --gateway 192.168.33.3 newnet
100 /etc/cni/net.d/newnet.conflist
101
102
103
104 Create a network that uses a *192.168.55.0/24** subnet and has an IP
105 address range of 192.168.55.129 - 192.168.55.254.
106
107
108 # podman network create --subnet 192.168.55.0/24 --ip-range 192.168.55.128/25
109 /etc/cni/net.d/cni-podman-5.conflist
110
111
112
113 Create a Macvlan based network using the host interface eth0
114
115
116 # podman network create --macvlan eth0 newnet
117 /etc/cni/net.d/newnet.conflist
118
119
120
122 podman(1), podman-network(1), podman-network-inspect(1)
123
124
126 August 2019, Originally compiled by Brent Baude bbaude@redhat.com
127 ⟨mailto:bbaude@redhat.com⟩
128
129
130
131 podman-network-create(1)()