# Wi-Fi: rc.conf(5) NOAUTO, service(8) netif start wlan0 and resolvconf(8) after disconnecting from a wired network



## grahamperrin@ (Jul 3, 2021)

FreeBSD 13.0-RELEASE-p3 starts with a wired connection to a Belkin router.

re(4)

`service netif start wlan0` gains the required address from the required wireless router, using DHCP.

I disconnect the network cable, interface `re0` disappears, I'm left with the /etc/resolv.conf that was generated by resolvconf(8) for the (Belkin) router that is no longer available.

Neither `resolvconf -u` nor `service resolv restart` leads to /etc/resolv.conf gaining the required update.

What must be done, for resolvconf(8) to write what's appropriate for the wireless router?


----------



## grahamperrin@ (Mar 13, 2022)

Also: 

FreeBSD networking: DNS: resolv.conf(5) after taking down an interface and bringing up another interface


Maybe some of my problems with networking will disappear, or ease, as a result of these commits fours hours ago:









						Introduce startmsg and use it in rc scripts · freebsd/freebsd-src@325ebf3
					

startmsg is a new rc.subr(8) function function to be used instead of echo(1) when for boot messages. It replaces the often forgotten      check_startmsgs && echo ...  with      startmsg ......




					github.com
				












						rc.d/*: Use startmsg instead of echo on start messages · freebsd/freebsd-src@19a6267
					

By rc.conf(5), setting rc_startmsgs="NO" should silence start messages.  Fix a few rc scripts by using startmsg.  PR:		255207 Reported by:	Jose Luis Duran <jlduran@gmail.com> Review...




					github.com
				




the latter *fixes a few rc scripts by using startmsg*.
FreeBSD bug 255207 – rc_startmsgs: Silence "Starting ..." messages is now _Closed FIXED_.

256957 – Wi-Fi: rc.conf(5) NOAUTO, ifconfig(8) up and unwanted WLAN connections to open networks remains open. 


Side notes

August and September 2020: 

rc.d belongs in libexec, not etc - Julio Merino (jmmv.dev)
BSD Now 369: Where rc.d belongs

Understanding the routing service, /etc/rc.d/routing (2022-01-28), where dnabre helped me to realise that: 



> /etc/rc.d/routing isn't a service. …


----------



## chrbr (Mar 14, 2022)

May be you want to check https://docs.freebsd.org/en/books/handbook/advanced-networking/#network-aggregation. With lagg(4) you can combine LAN and WLAN to one interface.


----------



## grahamperrin@ (Mar 14, 2022)

Thanks, I've seen the word _lagg_ in the past, however I'm *extremely* wary of experimenting with anything more complicated until there's a fix for automated unwanted connections to open networks. It's not my idea of good security.


----------

