How NetworkManager works
Now that we have covered how to use NetworkManager, let us explore how it works.
Architectural overview
The NetworkManager application is made up of four distinct parts:
- NetworkManager — a root daemon that handles the network connection and policy.
- DHCPCD — a DHCP client daemon used by NetworkManager.
- NetworkManagerInfo — program that gathers and communicates the user preferences toNetworkManager and gives notifications to the user.
- NetworkManagerNotification — notification icon located in the panel and used byNetworkManagerInfo to display the possible wired and wireless connections.
These components interact with each other to perform tasks associated withNetworkManager. A diagram displaying their interactions is shown in Figure 3, “NetworkManager interactions”.
NetworkManager and D-BUS
NetworkManager uses D-BUS (a message bus that allows applications to talk to each other) to interact with other applications. Using D-BUS allows for the flexibility of a standard interface while also including built-in security.
D-BUS is used internally for communication between:
- NetworkManager daemon and NetworkManagerInfo
- NetworkManagerInfo and NetworkManagerNotification
- NetworkManager daemon and HAL
Externally, NetworkManager uses D-BUS to broadcast information about various state changes. Other applications can monitor this information and theoretically be able to change network status.
NetworkManager and HAL
Included in Fedora Core 3 and in upcoming Red Hat Enterprise Linux releases, HAL, orHardware Abstraction Layer, provides the ability for applications to learn about existing and new hardware. For more information on HAL, read David Zeuthen's article on HAL.
NetworkManager queries HAL at startup to learn what network interfaces are available. Any changes in network hardware and link information is detected by HAL, and this information is immediately relayed to NetworkManager. HAL can also provide information about the network card's driver, which allows NetworkManager to special case certain cards.