Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
If the moderators judge this topic as unacceptable, please delete it. By this topic I do not intend to do anything illegal. My aim is to understand what is going on under the hood when a network interface like wlan0 is set up by low level utilities like ifup and ifdown.
This is my analyses till now. If someone is able to give more details or to direct me to a good reading resource that will save me this investigation, it will be almost too good to be true. Networking is a vast subject as there are very diverse means of connecting computers.
On my machine with wlan0 up and active, this is what I found:
For ethernet you need:
(1) interface up
(2) an address
like "ifconfig eth0 up 192.168.0.1"
If you don't want a fixed address, you need a DHCP client (like dhclient).
For wi-fi you need, between (1) and (2), to associate with an AP. This is what wpa_supplicant does.
(note that wpa_supplicant can also be used for Ethernet)
With that you have network connectivity.
If you also need Internet, you normally would set-up a default route via your router.
This is however neither offtopic nor "reverse engineering" (unless you want to know how/when systemd-networkd works and when not ;-)
ifup and ifdown, and ifconfig are C binary files. Their main job is to write the system's Routing Tables. I dont know what relation systemd has to if files, or even if they are written to act independant of them.
I would start researching the Routing Tables, looking at the (hopefully commented) source codes for both the if apps, as well as the net daemons.
Linux, as Open Source is *designed* to be reverse engineered. Use debug files for symbols . However its rather pointless with source available.