diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-27 12:16:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 12:16:50 -0500 |
commit | bedbc3e6fc2509ffa3b9a64da224fb21cd649284 (patch) | |
tree | 1b98f7142724855573d0a1e2976cb2d015ee5fc4 /docs | |
parent | 5d6b5a03557385e1a0d6d6ecc29522b0101e22dd (diff) | |
parent | 6961d912061c81b7a444e7c00163ae240e318c42 (diff) | |
download | podman-bedbc3e6fc2509ffa3b9a64da224fb21cd649284.tar.gz podman-bedbc3e6fc2509ffa3b9a64da224fb21cd649284.tar.bz2 podman-bedbc3e6fc2509ffa3b9a64da224fb21cd649284.zip |
Merge pull request #13042 from Luap99/subnets
network create: allow multiple subnets
Diffstat (limited to 'docs')
-rw-r--r-- | docs/source/markdown/podman-network-create.1.md | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/docs/source/markdown/podman-network-create.1.md b/docs/source/markdown/podman-network-create.1.md index 8a9b2f3cf..5be0c2595 100644 --- a/docs/source/markdown/podman-network-create.1.md +++ b/docs/source/markdown/podman-network-create.1.md @@ -46,7 +46,8 @@ The `macvlan` and `ipvlan` driver support the following options: #### **--gateway** Define a gateway for the subnet. If you want to provide a gateway address, you must also provide a -*subnet* option. +*subnet* option. Can be specified multiple times. +The argument order of the **--subnet**, **--gateway** and **--ip-range** options must match. #### **--internal** @@ -56,7 +57,8 @@ automatically disabled. #### **--ip-range** Allocate container IP from a range. The range must be a complete subnet and in CIDR notation. The *ip-range* option -must be used with a *subnet* option. +must be used with a *subnet* option. Can be specified multiple times. +The argument order of the **--subnet**, **--gateway** and **--ip-range** options must match. #### **--label** @@ -64,11 +66,13 @@ Set metadata for a network (e.g., --label mykey=value). #### **--subnet** -The subnet in CIDR notation. +The subnet in CIDR notation. Can be specified multiple times to allocate more than one subnet for this network. +The argument order of the **--subnet**, **--gateway** and **--ip-range** options must match. +This is useful to set a static ipv4 and ipv6 subnet. #### **--ipv6** -Enable IPv6 (Dual Stack) networking. +Enable IPv6 (Dual Stack) networking. If not subnets are given it will allocate a ipv4 and ipv6 subnet. ## EXAMPLE @@ -102,6 +106,12 @@ $ podman network create --subnet 192.168.55.0/24 --ip-range 192.168.55.128/25 cni-podman5 ``` +Create a network with a static ipv4 and ipv6 subnet and set a gateway. +``` +$ 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 +podman4 +``` + Create a Macvlan based network using the host interface eth0. Macvlan networks can only be used as root. ``` # podman network create -d macvlan -o parent=eth0 newnet |