Technology Lab —

The pros and “conns” of Intel’s ConnMan for Linux

Intel has created a new network management and configuration system for Linux …

Intel's Linux-based Moblin platform for netbook devices has much in common with conventional Linux distributions. Intel has adopted many standard components of the Linux desktop stack and has made modifications where necessary in order to boost mobile performance and usability. Moblin's extensive use of standard Linux components helps third-party developers because it guarantees a certain degree of portability between Moblin and regular Linux distributions.

But there are some major areas where Intel deviated substantially from the standard components and invented its own replacements. Moblin's highly innovative top-level user interface shell is one of the most evident cases, but there are other unique pieces of desktop infrastructure not immediately visible on the surface that are equally interesting.

One of Moblin's custom software components that has recently attracted considerable interest is its network management and configuration system. Instead of adopting NetworkManager, which is widely used by mainstream Linux distributions, Intel created its own framework called ConnMan... but not everyone is pleased with the decision.

Pros and Conns

NetworkManager was created by Red Hat and is used today in Fedora, Ubuntu, OpenSUSE, and many other distros. It provides a background service that manages devices and connections; it also has a user interface front-end that is accessible through the desktop notification area. The functionality provided by the NetworkManager background service is exposed through D-Bus, which makes it easy for third-party software developers to get information about connection availability and network device status.

The NetworkManager user interface gives users the ability to toggle connection status, select wireless networks, and perform other basic configuration tasks without having to use the command line or to manually edit configuration files. There are several custom NetworkManager user interfaces, including one for KDE that is built with Plasma. NetworkManager supports ethernet, WiFi, mobile broadband, and VPN connections.

ConnMan was created by Marcel Holtmann of Intel's Open Source Technology Center. Holtmann is probably best known for his works as the maintainer of BlueZ, the Linux Bluetooth stack. During a presentation at the Linux Collaboration Summit, he explained ConnMan and discussed some of the problems he encountered with NetworkManager that compelled him to build an alternative.

One problem was the difficulty of extending NetworkManager to support additional kinds of connectivity; Holtmann says that significant portions of NetworkManager's code base would have to be rewritten to facilitate support for WiMAX, for instance. He faced similar challenges when he attempted to overhaul NetworkManager to enable tight Bluetooth integration.

Holtmann also complains that the NetworkManager front-end and back-end are too tightly coupled and that too much of the connection switching logic is implemented in the front-end. These design issues are problematic for Moblin because individual vendors want to be able to ship their Moblin-based products with custom network management user interfaces that match the aesthetic of their specialized software shells. ConnMan is designed for easier extension on the back-end, and its front-end is intended to be easier to customize, rebrand, or replace.

Holtmann wanted to make it easy for third-party developers to use rich widget and canvas frameworks such as Clutter to build network configuration tools that will communicate seamlessly with ConnMan via D-Bus. On a touchscreen Internet device, for example, a vendor might want to have a finger-friendly WiFi selector with big buttons. There will also likely be scenarios where mobile carriers want to ship branded Moblin-based devices that integrate with their own connectivity services and have connection management tools that are designed accordingly.

Another advantage of ConnMan for Moblin is that it's designed specifically for mobile environments. Holtmann expressed frustration with NetworkManager's dependencies, many of which he argues aren't needed on a mobile device. In particular, he criticized NetworkManager's reliance on PolicyKit—a framework for handling permissions—which he contends is superfluous on single-user devices.

ConnMan is lighter and has fewer mandatory dependencies. PolicyKit and the udev device management system are optional dependencies, meaning that ConnMan can work without them in environments where they aren't needed. Many of ConnMan's advanced features are implemented in plugins, which can be disabled to further reduce its complexity and overhead.

ConnMan's suitability for mobile devices has attracted the interest of Nokia, which recently formed an alliance with Intel to collaborate on mobile Linux software. Nokia has committed to adopting ConnMan and contributing to the project as part of its joint development effort with Intel. ConnMan is clearly gaining traction in the mobile Linux space, but the response from the desktop community has been mixed.

NetworkManager developer responds

NetworkManager developer Dan Williams recently published a blog entry disputing some of Holtmann's criticisms of NetworkManager. He argues that NetworkManager is mature and sufficiently flexible to work well on mobile devices. He points out that NetworkManager has some significant features that ConnMan lacks, such as connection sharing, VPN support, and superior distro integration. He also contends that the culture behind NetworkManager is beneficial to the broader Linux system because the developers seek holistic improvement of the entire network stack and consistently push vendors to deliver drivers that don't suck.

In his view, NetworkManager has improved considerably over the past year and is currently in much better shape than it was when Holtmann decided to create ConnMan. He argues that ConnMan is less aligned with the desktop because it eschews GObject and other existing idioms and its lack of integration with distro-specific network configuration elements will be problematic for users.

Williams also dismisses many of Holtmann's criticisms of NetworkManager, particularly the claim that too much network selection logic is in the front-end. He points out that there are already a number of nice custom NetworkManager front-ends including one that is specifically for netbooks and one for the OLPC Sugar platform. It's also worth noting that Williams himself is working on a really elegant facelift for GNOME's NetworkManager front-end. Williams also attempts to debunk the claim that NetworkManager is too complex. He argues that Holtmann's graph of NetworkManager architecture is misleading and, in some places, factually inaccurate.

"It's unlikely that either NetworkManager or ConnMan will disappear in the near future. That means we'll all have to live with two mutually exclusive connection managers and two completely different network configuration systems. I think that's pretty pointless," he said. "The users will decide which solution works best for them. And that means NetworkManager will keep getting better, keep getting more useful, and will continue to be the easiest network management solution around."

The developers of the respective connection management frameworks clearly don't see eye-to-eye on design issues, so it's useful to get the perspective of a neutral third-party. Canonical, the company behind the popular Ubuntu Linux distribution, has conducted some preliminary research to evaluate the viability of replacing NetworkManager with ConnMan. It found that ConnMan is promising but is not yet sufficiently mature on the desktop—it still lacks some critical features relative to NetworkManager. A partial feature matrix is being assembled at the Ubuntu Wiki.

The fragmentation created by separate network management utilities is somewhat troubling for third-party application developers. Software applications on the Linux desktop often query NetworkManager to determine connection availability and to get other kinds of relevant information. The lack of a consistent shared D-Bus API for such tasks will create dev challenges; to address this problem, it would be helpful if the two projects could collaborate and agree on some standard D-Bus APIs for a few important things that are required by application developers.

It's not yet clear if ConnMan will be able to displace NetworkManager on the desktop, but its strengths in the mobile environments will likely make it relevant to mobile Linux adopters. Users interested in participating in ConnMan development can find the source code at the project's website.