Document the VLAN-id 0 special case.

This commit is contained in:
2026-05-14 15:25:48 -04:00
parent 5438fc765f
commit 0ba30c7440
3 changed files with 22 additions and 0 deletions
+7
View File
@@ -16,6 +16,12 @@ Adds an internal network segment with the specified vlan on the specified
card. The created vlan-adaptor is put into the specified group. It is setup card. The created vlan-adaptor is put into the specified group. It is setup
for both IPv4 and (where the ISP provides for it) IPv6. for both IPv4 and (where the ISP provides for it) IPv6.
If `${vlan}` is 0, then no tagged VLAN interfaces will be created; however,
the subnet address computations will still be performed as-if the vlan
were created. This means that `xy0` will use `0` or `00` for its subnet
computations in IPv4 and IPv6 respectively. If you don't intend to use
VLANs for subnets, just use VLAN ID 0 when declaring networks.
The IPv4 network will be a `/24` under `${v4_net_xy0}` if `${card}` is The IPv4 network will be a `/24` under `${v4_net_xy0}` if `${card}` is
`xy0`, for example. If `${v4_net_xy0}` is not set, then `${v4_net}` is `xy0`, for example. If `${v4_net_xy0}` is not set, then `${v4_net}` is
used by default. The 3rd octet will be `$(( ${vlan}/10 + ${vlan}%10 ))`. For used by default. The 3rd octet will be `$(( ${vlan}/10 + ${vlan}%10 ))`. For
@@ -50,6 +56,7 @@ IPv6, and VLAN ID. Each can be visually compared to the others.)
|VLAN|IPv4 (3rd octet)|IPv6 suffix (hex)|Example IPv4 |Example IPv6 | |VLAN|IPv4 (3rd octet)|IPv6 suffix (hex)|Example IPv4 |Example IPv6 |
|---:|---------------:|----------------:|--------------:|----------------------:| |---:|---------------:|----------------:|--------------:|----------------------:|
| 0| 0 | 0 |192.168.0.0/24 |2001:db8:abcd:ef00::/64|
| 7| 7 | 7 |192.168.7.0/24 |2001:db8:abcd:ef07::/64| | 7| 7 | 7 |192.168.7.0/24 |2001:db8:abcd:ef07::/64|
| 101|11 | 11 |192.168.11.0/24|2001:db8:abcd:ef11::/64| | 101|11 | 11 |192.168.11.0/24|2001:db8:abcd:ef11::/64|
| 205|25 | 25 |192.168.25.0/24|2001:db8:abcd:ef25::/64| | 205|25 | 25 |192.168.25.0/24|2001:db8:abcd:ef25::/64|
+8
View File
@@ -16,6 +16,13 @@ Adds an internal network segment with the specified vlan on the specified
card. The created vlan-adaptor is put into the specified group. It is setup card. The created vlan-adaptor is put into the specified group. It is setup
for IPv4. for IPv4.
If `${vlan}` is 0, then no tagged VLAN interfaces will be created; however,
the subnet address computations will still be performed as-if the vlan
were created. This means that `xy0` will use `0` for its subnet
computations in IPv4. If you don't intend to use
VLANs for subnets, just use VLAN ID 0 when declaring networks.
The IPv4 network will be a `/24` under `${v4_net_xy0}` if `${card}` is The IPv4 network will be a `/24` under `${v4_net_xy0}` if `${card}` is
`xy0`, for example. If `${v4_net_xy0}` is not set, then `${v4_net}` is `xy0`, for example. If `${v4_net_xy0}` is not set, then `${v4_net}` is
used by default. The 3rd octet will be `$(( ${vlan}/10 + ${vlan}%10 ))`. For used by default. The 3rd octet will be `$(( ${vlan}/10 + ${vlan}%10 ))`. For
@@ -36,6 +43,7 @@ IPv6, and VLAN ID. Each can be visually compared to the others.)
|VLAN|IPv4 (3rd octet)|Example IPv4 | |VLAN|IPv4 (3rd octet)|Example IPv4 |
|---:|---------------:|--------------:| |---:|---------------:|--------------:|
| 0| 0 |192.168.0.0/24 |
| 7| 7 |192.168.7.0/24 | | 7| 7 |192.168.7.0/24 |
| 101|11 |192.168.11.0/24| | 101|11 |192.168.11.0/24|
| 205|25 |192.168.25.0/24| | 205|25 |192.168.25.0/24|
+7
View File
@@ -16,6 +16,12 @@ Adds an internal network segment with the specified vlan on the specified
card. The created vlan-adaptor is put into the specified group. It is setup card. The created vlan-adaptor is put into the specified group. It is setup
for only IPv6. for only IPv6.
If `${vlan}` is 0, then no tagged VLAN interfaces will be created; however,
the subnet address computations will still be performed as-if the vlan
were created. This means that `xy0` will use `00` for its subnet
computations in IPv6. If you don't intend to use
VLANs for subnets, just use VLAN ID 0 when declaring networks.
The IPv6 network will make `$(( ${vlan}/10 + ${vlan}%10 ))` into hex digits The IPv6 network will make `$(( ${vlan}/10 + ${vlan}%10 ))` into hex digits
to be appended to the ISP's IPv6 prefix. This makes it compatible with the to be appended to the ISP's IPv6 prefix. This makes it compatible with the
most common case of `/56` for most ISPs. If `no_ula` is specified in the most common case of `/56` for most ISPs. If `no_ula` is specified in the
@@ -46,6 +52,7 @@ IPv6 and VLAN ID. Each can be visually compared to the other.)
|VLAN|IPv6 suffix (hex)|Example IPv6 | |VLAN|IPv6 suffix (hex)|Example IPv6 |
|---:|----------------:|----------------------:| |---:|----------------:|----------------------:|
| 0| 0 |2001:db8:abcd:ef00::/64|
| 7| 7 |2001:db8:abcd:ef07::/64| | 7| 7 |2001:db8:abcd:ef07::/64|
| 101| 11 |2001:db8:abcd:ef11::/64| | 101| 11 |2001:db8:abcd:ef11::/64|
| 205| 25 |2001:db8:abcd:ef25::/64| | 205| 25 |2001:db8:abcd:ef25::/64|