-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI:DOCS] Add network subnets info to network man page #17847
[CI:DOCS] Add network subnets info to network man page #17847
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TomSweeneyRedHat The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some small nits
## SUBNET NOTES | ||
Podman requires specific default IPs and, thus, network subnets. The default values used by Podman can be modified in the **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** file. | ||
|
||
###Podman network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
###Podman network | |
### Podman network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Podman requires specific default IPs and, thus, network subnets. The default values used by Podman can be modified in the **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** file. | ||
|
||
###Podman network | ||
The default bridge network (called `podman`) uses 10.88.0.0/16 as a subnet. When Podman runs as root, the `podman` network is used as default. It is the same as adding the option `--network bridge` or `--network podman`. This subnet can be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** under the [network] section. Set the default subnet to any subnet that is free in the environment. The default `podman` name can also change to something else with the default network key. Note that this should only be done when no containers are running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default bridge network (called `podman`) uses 10.88.0.0/16 as a subnet. When Podman runs as root, the `podman` network is used as default. It is the same as adding the option `--network bridge` or `--network podman`. This subnet can be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** under the [network] section. Set the default subnet to any subnet that is free in the environment. The default `podman` name can also change to something else with the default network key. Note that this should only be done when no containers are running. | |
The default bridge network (called `podman`) uses 10.88.0.0/16 as a subnet. When Podman runs as root, the `podman` network is used as default. It is the same as adding the option `--network bridge` or `--network podman`. This subnet can be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** under the [network] section. Set the `default_subnet` to any subnet that is free in the environment. The default `podman` name can also change to something else with the default network key. Note that this should only be done when no containers are running. |
This is an actual key in the config. Otherwise it may not clear which key to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch, ty and done
###Podman network | ||
The default bridge network (called `podman`) uses 10.88.0.0/16 as a subnet. When Podman runs as root, the `podman` network is used as default. It is the same as adding the option `--network bridge` or `--network podman`. This subnet can be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** under the [network] section. Set the default subnet to any subnet that is free in the environment. The default `podman` name can also change to something else with the default network key. Note that this should only be done when no containers are running. | ||
|
||
###Slirp4netns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
###Slirp4netns | |
### Slirp4netns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
The default bridge network (called `podman`) uses 10.88.0.0/16 as a subnet. When Podman runs as root, the `podman` network is used as default. It is the same as adding the option `--network bridge` or `--network podman`. This subnet can be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** under the [network] section. Set the default subnet to any subnet that is free in the environment. The default `podman` name can also change to something else with the default network key. Note that this should only be done when no containers are running. | ||
|
||
###Slirp4netns | ||
When Podman is run as rootless, the internet connectivity is provided with slirp4netns by default. Slirp4nents uses 10.0.2.0/24 for its default network. This can also be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** but under the `[engine]` section. Use the network cmd options key and add `["cidr=X.X.X.X/24"]` as a value. Note that slirp4netns needs a network prefix size between 1 and 25. This option accepts an array, so more options can be added in a comma-separated string as described on the **[podman-network-create(1)](podman-network-create.1.md)** man page. To change the CIDR for just one container, specify it on the cli using the `--network` opiton like this: `--network slirp4netns:cidr=192.168.1.0/24`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Podman is run as rootless, the internet connectivity is provided with slirp4netns by default. Slirp4nents uses 10.0.2.0/24 for its default network. This can also be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** but under the `[engine]` section. Use the network cmd options key and add `["cidr=X.X.X.X/24"]` as a value. Note that slirp4netns needs a network prefix size between 1 and 25. This option accepts an array, so more options can be added in a comma-separated string as described on the **[podman-network-create(1)](podman-network-create.1.md)** man page. To change the CIDR for just one container, specify it on the cli using the `--network` opiton like this: `--network slirp4netns:cidr=192.168.1.0/24`. | |
When Podman is run as rootless, the internet connectivity is provided with slirp4netns by default. Slirp4nents uses 10.0.2.0/24 for its default network. This can also be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** but under the `[engine]` section. Use the `network_cmd_options` key and add `["cidr=X.X.X.X/24"]` as a value. Note that slirp4netns needs a network prefix size between 1 and 25. This option accepts an array, so more options can be added in a comma-separated string as described on the **[podman-network-create(1)](podman-network-create.1.md)** man page. To change the CIDR for just one container, specify it on the cli using the `--network` opiton like this: `--network slirp4netns:cidr=192.168.1.0/24`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
When using the default network as rootless, i.e. --network podman/bridge, then it also uses the same subnet as described above in addition to the slirp4netns subnet. | ||
|
||
###Podman network create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
###Podman network create | |
### Podman network create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
When using the default network as rootless, i.e. --network podman/bridge, then it also uses the same subnet as described above in addition to the slirp4netns subnet. | ||
|
||
###Podman network create | ||
When a new network is created with a `podman network create` command, and no subnet is given with the --subnet option, Podman will start picking a free subnet from 10.89.0.0/24 to 10.255.255.0/24. Use the default subnet pools option under the `[network]` section in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** to change the range and/or size that is assigned by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a new network is created with a `podman network create` command, and no subnet is given with the --subnet option, Podman will start picking a free subnet from 10.89.0.0/24 to 10.255.255.0/24. Use the default subnet pools option under the `[network]` section in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** to change the range and/or size that is assigned by default. | |
When a new network is created with a `podman network create` command, and no subnet is given with the --subnet option, Podman will start picking a free subnet from 10.89.0.0/24 to 10.255.255.0/24. Use the `default_subnet_pools` option under the `[network]` section in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** to change the range and/or size that is assigned by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done and thx!
a975b34
to
c7dc5c3
Compare
Thx for the review @Luap99 . Updated and repushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Green buttons and ready to go, just needs a final push. |
@baude @mheon @vrothberg @rhatdan mergme plz! |
Podman requires specific default IPs and, thus, network subnets. The default values used by Podman can be modified in the **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** file. | ||
|
||
### Podman network | ||
The default bridge network (called `podman`) uses 10.88.0.0/16 as a subnet. When Podman runs as root, the `podman` network is used as default. It is the same as adding the option `--network bridge` or `--network podman`. This subnet can be changed in **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** under the [network] section. Set the `default subnet` to any subnet that is free in the environment. The default `podman` name can also change to something else with the default network key. Note that this should only be done when no containers are running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second to last sentence is a little wierd. "The name of the default network can also be changed from podman
to another name using the default network key" maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed, with just a slight tweak to backtick the word podman. That does flow better, thanks!
Adds information to the network command to explain how to change the default options for the bridge or IP. This steals very liberally from @Luap99 's blog post: https://blog.podman.io/2023/02/default-podman-network-subnets/ This addresses: https://issues.redhat.com/browse/OCPBUGS-9296 [NO NEW TESTS NEEDED] Signed-off-by: tomsweeneyredhat <[email protected]>
c7dc5c3
to
46b826a
Compare
Repushed with requested changed. |
/lgtm |
Co-authored-by: Paul Holzinger <[email protected]> Signed-off-by: Daniel J Walsh <[email protected]>
/lgtm |
Adds information to the network command to explain how to change the default options for the bridge or IP.
This steals very liberally from @Luap99 's blog post: https://blog.podman.io/2023/02/default-podman-network-subnets/
This addresses: https://issues.redhat.com/browse/OCPBUGS-9296
[NO NEW TESTS NEEDED]
Does this PR introduce a user-facing change?