The base's network rc scripts and rc.conf defaults have no location/profile concept (searched, existing files named). dhcpcd.conf(5) has interface and ssid blocks, profile NAME, fallback PROFILE and arping-selected profiles -- automatic selection, no user switch. A Location menu is therefore ours to design (ssid blocks for Wi-Fi, or a directory per location that rewrites files etcupdate owns); not a pane detail. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
139 lines
7.4 KiB
Plaintext
139 lines
7.4 KiB
Plaintext
The network settings of an interface -- where each system keeps them
|
|
Read 2026-11-13 for System Settings > Network (MCDE: McdeSys
|
|
mcde_sys_net_config / mcde_sys_net_configure).
|
|
|
|
== NetBSD: dhcpcd.conf, one block per interface ==
|
|
|
|
src/share/man/man5/ifconfig.if.5, DESCRIPTION, 4th paragraph:
|
|
|
|
If the line is equal to "dhcp", dhcpcd(8) will be started for the
|
|
interface. However, it is instead recommended that dhcpcd is set to true
|
|
in rc.conf(5) and any per interface configuration or restriction is done
|
|
in dhcpcd.conf(5).
|
|
|
|
So: rc.conf dhcpcd=YES, and per interface a block in /etc/dhcpcd.conf.
|
|
sysinst (src/usr.sbin/sysinst/net.c:1154-1205) still writes a static
|
|
address as "ADDR netmask MASK" into /etc/ifconfig.IF and defaultroute= into
|
|
rc.conf, DHCP as dhcpcd=YES with dhcpcd_flags="-qM IF". McdeSys reads both
|
|
(an inet line in ifconfig.IF means "Manually") and writes the recommended
|
|
form; the inet lines of ifconfig.IF are taken out when it does, "up" and
|
|
"media" stay.
|
|
|
|
src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5 (dhcpcd 10.5.2):
|
|
|
|
interface interface
|
|
Subsequent options are only parsed for this interface.
|
|
static value
|
|
Configures a static value. If you set ip_address then dhcpcd will
|
|
not attempt to obtain a lease and will just use the value for the
|
|
address with an infinite lease time. [...] For IPv4, you should use
|
|
the inform ipaddress option instead of setting a static address.
|
|
interface eth0
|
|
noipv6rs
|
|
static ip_address=192.168.0.10/24
|
|
static ip6_address=fd51:42f8:caae:d92e::ff/64
|
|
static routers=192.168.0.1
|
|
static domain_name_servers=192.168.0.1 fd51:42f8:caae:d92e::1
|
|
inform [address[/cidr[/broadcast_address]]]
|
|
Behaves like request as above, but sends a DHCP INFORM instead of
|
|
DISCOVER/REQUEST. This does not get a lease as such, just notifies
|
|
the DHCP server of the address in use.
|
|
clientid string
|
|
Send the clientid.
|
|
noipv4 Don't attempt to configure an IPv4 address.
|
|
noipv6 Don't solicit or accept IPv6 Router Advertisements and DHCPv6.
|
|
|
|
How the pane's choices map (the block between "# MCDE network IF begin" and
|
|
"# MCDE network IF end"):
|
|
Using DHCP (no block, or only clientid)
|
|
Using DHCP with manual address inform ADDR/PREFIX
|
|
Manually static ip_address=ADDR/PREFIX
|
|
static routers=ROUTER
|
|
Off noipv4
|
|
IPv6 Automatically (nothing)
|
|
IPv6 Manually static ip6_address=ADDR/PREFIX
|
|
IPv6 Off noipv6
|
|
DNS servers, search domains static domain_name_servers=A B ...
|
|
static domain_search=D E ...
|
|
dhcpcd hands DNS to resolvconf(8) (openresolv), which writes
|
|
/etc/resolv.conf; the current servers are read from that file.
|
|
Applied now by "/etc/rc.d/dhcpcd restart" (rc.subr(8)).
|
|
|
|
src/share/man/man5/rc.conf.5:
|
|
defaultroute A string. Default IPv4 network route.
|
|
dhcpcd Boolean value. Set true to configure some or all network
|
|
interfaces using dhcpcd. [...] If you need to restrict
|
|
dhcpcd to one or a number of interfaces, or need a separate
|
|
configuration per interface, then this should be done in
|
|
the configuration file - see dhcpcd.conf(5)
|
|
|
|
== Linux: NetworkManager, nmcli(1) 1.56.1 ==
|
|
|
|
man 5 nm-settings-nmcli (Debian 14 host):
|
|
|
|
ipv4.method "auto" - Enables automatic IPv4 address assignment from
|
|
DHCP [...] "manual" - [...] you must set at least one IP
|
|
address and subnet mask in the "ipv4.addresses" property.
|
|
"disabled" - Disables the IPv4 protocol in this connection
|
|
profile.
|
|
ipv4.addresses A list of IPv4 addresses and their prefix length.
|
|
ipv6.method "auto" [...] "manual" [...] "disabled" [...]
|
|
|
|
Using DHCP ipv4.method auto, ipv4.addresses ""
|
|
Using DHCP with manual address ipv4.method auto, ipv4.addresses ADDR/P
|
|
Manually ipv4.method manual, ipv4.addresses,
|
|
ipv4.gateway
|
|
Off ipv4.method disabled
|
|
DNS ipv4.dns, ipv4.dns-search
|
|
DHCP client ID ipv4.dhcp-client-id
|
|
Read with "nmcli -t -g PROPS connection show NAME" (configured) and
|
|
"nmcli -t -g IP4.ADDRESS,... device show IF" (current); written with
|
|
"nmcli connection modify NAME ..." and applied with "nmcli connection up
|
|
NAME". Measured on this host 2026-11-13: device enxde5285b18f9e,
|
|
connection "Wired connection 1", ipv4.method auto, ipv4.dns 1.1.1.1,
|
|
IP4.ADDRESS 172.20.10.3/28, IP4.GATEWAY 172.20.10.1.
|
|
|
|
== The look: the Network pane of the 10.4 generation ==
|
|
|
|
Konrad 2026-11-13: "nimm mac os x 10.4 network config as inspiration";
|
|
https://devices.eduroam.ac.ke/mediawiki-1.25.1/index.php?title=Mac_OS_X_10.4_-_Tiger
|
|
(screenshots of the pane, read 2026-11-13). What that pane has: "Show:"
|
|
chooses Network Status or one port; a port has the tabs AirPort, TCP/IP,
|
|
DNS, WINS, AppleTalk, 802.1X, Proxies, Ethernet; TCP/IP has "Configure
|
|
IPv4:" (Using DHCP, Using DHCP with manual address, Manually, Off), IP
|
|
Address, Subnet Mask, Router, DHCP Client ID, "Renew DHCP Lease",
|
|
"Configure IPv6"; DNS has DNS Servers and Search Domains; the lock ("Click
|
|
the lock to prevent further changes") and "Apply Now" at the bottom.
|
|
MCDE takes Network Status, TCP/IP, DNS, Wi-Fi, Ethernet, the lock and
|
|
Apply Now; WINS, AppleTalk, 802.1X and Proxies are not drawn yet.
|
|
|
|
2026-11-14 (t0131): is there a "location" (a named set of network settings the
|
|
user switches) in NetBSD? Read in src/etc and src/external/bsd/dhcpcd.
|
|
- No. The network scripts etc/rc.d/network (573 lines), etc/rc.d/dhcpcd,
|
|
etc/rc.d/wpa_supplicant, etc/rc.d/ppp and etc/defaults/rc.conf were searched
|
|
for location/netprofile/profile (case-insensitive): no match. (etc/rc.d/
|
|
ifconfig and etc/network.subr do not exist.) The per-interface files are
|
|
/etc/ifconfig.xxN (etc/rc.d/network:207-230).
|
|
- dhcpcd (in the base) has SELECTORS, not a switch the user turns:
|
|
* "interface IF" and "ssid SSID": the following options apply to that
|
|
interface or that Wi-Fi network (dhcpcd.conf(5): "Subsequent options are
|
|
only parsed for this wireless ssid", :~690);
|
|
* "profile NAME" (dhcpcd.conf(5):694): a named block of options;
|
|
* "fallback PROFILE" (:306): "Fall back to using this profile if DHCP
|
|
fails. This allows you to configure a static profile instead of using
|
|
ZeroConf";
|
|
* "arping ADDR" with "profile" (:85-101): a profile is chosen when the host
|
|
at that address answers.
|
|
dhcpcd(8) does not mention profiles: they are chosen only by what is in
|
|
dhcpcd.conf.
|
|
- So a "Location" in the pane is not something to switch on; it is ours to
|
|
build. Two honest ways: (a) a Wi-Fi-only version with dhcpcd's own "ssid"
|
|
blocks (the system chooses by the network it joins -- no Location menu); (b)
|
|
the task's proposal, a directory per location with copies of the files
|
|
(/etc/makronix/locations/NAME/ and a McdeSys function to copy one into
|
|
place, root). (b) rewrites /etc/ifconfig.* and dhcpcd.conf, which belong to
|
|
the administrator and to etcupdate (docs/UPDATING.md): a real design question,
|
|
not a pane detail.
|
|
- Not looked at: whether Makronix runs dhcpcd for every interface by default
|
|
(the installer's rc.conf), and how McdeSys writes dhcpcd.conf today.
|