From e53bf3b48ab10aeb5bc8d9eb459e2326d41402ac Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 21 May 2023 10:55:09 +0200 Subject: network: provide some minimal description for each setting network settings were becoming a bit cryptic, so let's provide some minimal help with them and how they are supposed to be used. --- sbin/init.d/network | 163 ++++++++++++++++++++++---------------------- 1 file changed, 83 insertions(+), 80 deletions(-) diff --git a/sbin/init.d/network b/sbin/init.d/network index 93a6830..7ca2180 100755 --- a/sbin/init.d/network +++ b/sbin/init.d/network @@ -1,45 +1,47 @@ #!/bin/bash # service network [] -# ip [[addr
] | dhcp | autoconfig] [] -# ip [{arp|neigh} {|pub}] [] -# ip [route <-|gw>] [] -# ip6 [addr ] [] -# ip6 [neigh {|proxy}] [] -# ip6 [route <-|gw6>] [] -# auto {on|off} -# duplex {half|full} -# speed {10|100|1000|...} -# media auto|{full|fdx|100full|100fdx}|{half|hdx|100half|100hdx} (deprecated) -# fctl {auto|both|rx|tx|none} -# bridge (implies type=bridge, deprecated: use slave instead) -# bridge_stp {on|off} -# slave (implies type=bonding) -# bonding -# sysctl = (under net or net.ipv4.conf.\$if) -# sysctl6 = (under net.ipv6.conf.\$if) -# sysset = (under class.net or class.net.\$if) -# modprobe -# load|unload -# lladdr -# replace -# mtu -# arp {on|off} -# multicast {on|off} -# shutdown -# type -# vrrp [...]* -# wg listen_port -# wg fwmark -# wg private_key -# wpa_ssid -# wpa_psk -# wpa_group -# wpa_key_mgmt -# wpa_proto -# usedhcphostname [0|1] (def: 0) -# dhcptimeout (def: 10) -# autoconf_script (def: /usr/libexec/ipautoconfig) +# arp {on|off} : enable/disable ARP for IPv4" +# auto {on|off} : enable/disable link speed auto-negotiation" +# autoconf_script : script to run with 'ip autoconfig' (def: /usr/libexec/ipautoconfig)" +# bonding : set bonding parameter (primary, mode, updelay, downdelay, ...)" +# bridge : deprecated, imples type=bridge. Use type and slave instead" +# bridge_stp {on|off} : enable/disable spanning tree protocol on bridge" +# dhcptimeout : set timeout for ip dhcp and ip autoconfig (def: 10)" +# duplex {half|full} : force link duplex" +# fctl {auto|both|rx|tx|none} : enable/disable sending and processing of flow control frames" +# ip [[addr
] | dhcp | autoconfig] [] : set IPv4 address and mask" +# ip [dhcp | autoconfig] : manage IPv4 address using DHCP, or only once at boot (autoconfig)" +# ip [route <-|gw>] [] : set IPv4 routes" +# ip [{arp|neigh} {|pub}] [] : set IPv4 ARP entry" +# ip6 [addr ] [] : set IPv6 address" +# ip6 [neigh {|proxy}] [] : set IPv6 neighbor (IPv6 equiv to ARP)" +# ip6 [route <-|gw6>] [] : set IPv6 routes" +# lladdr : set interface MAC address" +# load|unload : commands to be executed when interface is brought up/down" +# media auto|{full|fdx|100full|100fdx}|{half|hdx|100half|100hdx} (deprecated, use speed & duplex)" +# modprobe : load this module with optional arguments" +# mtu : set interface MTU" +# multicast {on|off} : enable/disable receiving of multicasts" +# replace : use and rename interface old_if_name if not found" +# shutdown : disable this interface" +# slave (implies type=bonding) : specify slave interfaces for bond/bridge" +# speed {10|100|1000|...} : set link speed" +# sysctl = : set network sysctl in root instance or net.ipv4.conf.\$if for interfaces" +# sysctl6 =: set net.ipv6.conf.\$if sysctl for interfaces" +# sysset =: set param in sys.class.net for root or sys.class.net.\$if for interfaces" +# type : specify interface type" +# usedhcphostname [0|1] : allow to set the host name from DHCP (def: 0)" +# vrrp instance [setting value]* : set VRRP setting for VRRP instance" +# vrrp [id|prio|address|no-address|auth_type|passwod|garp|v2|v3|...] [...]* : see service vrrp " +# wg fwmark : mark outgoing WG packets with this FW mark" +# wg listen_port : make WG listen on this port" +# wg private_key : the the WG private key from this file" +# wpa_group : set the 'group' WPA parameter (dev: nond)" +# wpa_key_mgmt : set the 'key_mgmt' WPA parameter (def: NONE)" +# wpa_proto : set the 'proto' WPA parameter (def:WPA RSN)" +# wpa_psk : set the 'psk' WPA parameter (def: none)" +# wpa_ssid : set the 'ssid' WPA parameter (non-empty enables WPA)" # Notes for IPv6 addressing: accept_ra defaults to 1 which means that an # address and a default route may be assigned by a local default gateway for @@ -107,47 +109,48 @@ SVC_VARS="addr_list addr6_list route_list route6_list arp_list addr_idx addr6_id function do_help { echo "Usage: ${0##*/} " - echo "List of config.rc options (name, type, default value, current value) :" - echo - echo " - ip [[addr
] | dhcp | autoconfig] []" - echo " - ip [{arp|neigh} {|pub}] []" - echo " - ip [route <-|gw>] []" - echo " - ip6 [addr ] []" - echo " - ip6 [neigh {|proxy}] []" - echo " - ip6 [route <-|gw6>] []" - echo " - auto {on|off}" - echo " - duplex {half|full}" - echo " - speed {10|100|1000|...}" - echo " - media auto|{full|fdx|100full|100fdx}|{half|hdx|100half|100hdx} (deprecated)" - echo " - fctl {auto|both|rx|tx|none}" - echo " - bridge (imples type=bridge, deprecated: use slave instead)" - echo " - bridge_stp {on|off}" - echo " - slave (implies type=bonding)" - echo " - bonding " - echo " - sysctl = (under net or net.ipv4.conf.\$if)" - echo " - sysctl6 = (under net.ipv6.conf.\$if)" - echo " - sysset = (under class.net or class.net.\$if)" - echo " - modprobe " - echo " - load|unload " - echo " - lladdr " - echo " - replace " - echo " - mtu " - echo " - arp {on|off}" - echo " - multicast {on|off}" - echo " - shutdown" - echo " - type " - echo " - vrrp [...]*" - echo " - wg listen_port " - echo " - wg fwmark " - echo " - wg private_key " - echo " - wpa_ssid " - echo " - wpa_psk " - echo " - wpa_group " - echo " - wpa_key_mgmt " - echo " - wpa_proto " - echo " - usedhcphostname [0|1] (def: 0)" - echo " - dhcptimeout (def: 10)" - echo " - autoconf_script (def: /usr/libexec/ipautoconfig)" + echo "List of config.rc options (name, type, default value) :" + echo " - arp {on|off} : enable/disable ARP for IPv4" + echo " - auto {on|off} : enable/disable link speed auto-negotiation" + echo " - autoconf_script : script to run with 'ip autoconfig' (def: /usr/libexec/ipautoconfig)" + echo " - bonding : set bonding parameter (primary, mode, updelay, downdelay, ...)" + echo " - bridge : deprecated, imples type=bridge. Use type and slave instead" + echo " - bridge_stp {on|off} : enable/disable spanning tree protocol on bridge" + echo " - dhcptimeout : set timeout for ip dhcp and ip autoconfig (def: 10)" + echo " - duplex {half|full} : force link duplex" + echo " - fctl {auto|both|rx|tx|none} : enable/disable sending and processing of flow control frames" + echo " - ip [[addr
] | dhcp | autoconfig] [] : set IPv4 address and mask" + echo " - ip [dhcp | autoconfig] : manage IPv4 address using DHCP, or only once at boot (autoconfig)" + echo " - ip [route <-|gw>] [] : set IPv4 routes" + echo " - ip [{arp|neigh} {|pub}] [] : set IPv4 ARP entry" + echo " - ip6 [addr ] [] : set IPv6 address" + echo " - ip6 [neigh {|proxy}] [] : set IPv6 neighbor (IPv6 equiv to ARP)" + echo " - ip6 [route <-|gw6>] [] : set IPv6 routes" + echo " - lladdr : set interface MAC address" + echo " - load|unload : commands to be executed when interface is brought up/down" + echo " - media auto|{full|fdx|100full|100fdx}|{half|hdx|100half|100hdx} (deprecated, use speed & duplex)" + echo " - modprobe : load this module with optional arguments" + echo " - mtu : set interface MTU" + echo " - multicast {on|off} : enable/disable receiving of multicasts" + echo " - replace : use and rename interface old_if_name if not found" + echo " - shutdown : disable this interface" + echo " - slave (implies type=bonding) : specify slave interfaces for bond/bridge" + echo " - speed {10|100|1000|...} : set link speed" + echo " - sysctl = : set network sysctl in root instance or net.ipv4.conf.\$if for interfaces" + echo " - sysctl6 =: set net.ipv6.conf.\$if sysctl for interfaces" + echo " - sysset =: set param in sys.class.net for root or sys.class.net.\$if for interfaces" + echo " - type : specify interface type" + echo " - usedhcphostname [0|1] : allow to set the host name from DHCP (def: 0)" + echo " - vrrp instance [setting value]* : set VRRP setting for VRRP instance" + echo " - vrrp [id|prio|address|no-address|auth_type|passwod|garp|v2|v3|...] [...]* : see service vrrp " + echo " - wg fwmark : mark outgoing WG packets with this FW mark" + echo " - wg listen_port : make WG listen on this port" + echo " - wg private_key : the the WG private key from this file" + echo " - wpa_group : set the 'group' WPA parameter (dev: nond)" + echo " - wpa_key_mgmt : set the 'key_mgmt' WPA parameter (def: NONE)" + echo " - wpa_proto : set the 'proto' WPA parameter (def:WPA RSN)" + echo " - wpa_psk : set the 'psk' WPA parameter (def: none)" + echo " - wpa_ssid : set the 'ssid' WPA parameter (non-empty enables WPA)" exit 1 } -- 2.35.3