ip_local_port_range: prefer different parity for start/end values.
时间: 2023-12-10 13:38:35 浏览: 984
The `ip_local_port_range` is a kernel parameter that defines the range of local ports that are used for outgoing connections. The default range is usually 32768 to 60999, but it can be changed by modifying the `/proc/sys/net/ipv4/ip_local_port_range` file.
The warning "prefer different parity for start/end values" means that the start and end values of the port range should have different parity (i.e., one should be odd and the other should be even). This is because some applications may not work correctly if both the start and end values are either odd or even.
To fix this warning, you can modify the `ip_local_port_range` parameter to use an odd start value and an even end value (or vice versa). For example:
```
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
```
This will set the start value to 1024 (which is even) and the end value to 65535 (which is odd), avoiding the parity warning.
阅读全文