From Fedora Project Wiki

Connection Sharing

Summary

Connection sharing allows to easily set up an ad-hoc wifi network on a machine with a network connection and a spare wireless card. If the machine has primary network connection (wired, 3G, second wireless card), routing is set up so that devices connected to the ad-hoc wifi network can share the connection to the outside network.

Owner

  • Name: DanWilliams

Current status

  • Targeted release: Fedora 10
  • Last updated: 2008-08-08
  • Percentage of completion: 100%

Detailed Description

nm-applet has had a "Create New Wireless Network" menuitem for a long time, but it has never been particularly useful. This feature makes it work better.

When you create a new wifi network, you have to specify the name of the network and what kind of wireless security to use, then NetworkManager sets up the wireless card to work as an ad-hoc wifi node that others can join. The routing will be set up between the new network and the primary network connection, and DHCP is used for assigning IP addresses on the new shared wifi network. DNS queries are also forwarded to upstream nameservers transparently.

Benefit to Fedora

Connection sharing is very useful in any place where you find many networks and only a limited number of network connections, such as conferences, or where the only connectivity for a group of people is a single mobile broadband (3G) card.

Scope

This feature requires changes to nm-applet and NetworkManager.

Test Plan

Have two laptops, one with a primary network connection and a spare wireless card, and another one. Make sure the first laptop is connected to some existing network (via wired, 3G, etc). Set up a shared connection on the first laptop by choosing "Create New Wireless Network..." (or choosing a previously created shared network from the Connection... popup menu) and wait for NetworkManager to successfully start the shared network. With the other laptop, connect to the shared wifi network of the first laptop like you'd connect to any normal wifi network: select it from nm-applet's menu and wait for a successful connection. Try to browse the web.

Repeat this test with different wireless security settings (WEP, WPA, open). Due to kernel driver bugs, you may need to create separate new networks for each different security setting rather than just changing the security of the original shared network. The second laptop should ask you for the password/key when connecting to the first laptop's shared network.

Repeat this test with different operating systems on the second laptop. Both Windows and Mac OS X should be able to connect to the first laptop and browse the web too.


Test Results using NetworkManager-0.7.0-0.11.svn4022.1 or newer
Client OS No security settings WEP 40/128-bit Key WEP 128-bit Passphrase WPA & WPA2 Personal
Fedora 10
Fedora 9
Fedora 8
Windows
OSX slow, but got an IP, safari connected to external sites Connects, but OSX gets IP of 169.254.11.8 and no traffic works Connects, but OSX gets IP of 169.254.11.8 and no traffic works rhbug:461169
Mobile Device (iPhone) No problems (Connects + traffic) No problems (Connects + traffic) Connects + traffic. Read http://support.apple.com/kb/HT1126 rhbug:461169

User Experience

A user on a machine with a wired or 3G network connection and a wireless network card can use the "Create New Wireless Network..." dialog in the NetworkManager applet to create an ad-hoc wifi network. To do so he needs to pick the Network Name (SSID), the security settings to use, and if security is used, the passphrase or key.

A user on another machine with a wireless network card can then use the NetworkManager applet to connect to the newly created ad-hoc network (it should show up in the menu after at most a few minutes, but usually within 10 seconds or so depending on the driver). If the shared network was secured, the second user will need to enter the correct passphrase or key.

Once the connection is established, the second machine has access to the internet.

Dependencies

Requires installing dnsmasq, but this will be a dependency of the NetworkManager package and thus should be transparent to the user.

Contingency Plan

Leave the existing Connection Sharing UI in nm-applet nonfunctional or remove it.

Documentation

Features/ConnectionSharing

Release Notes

Fedora 10 introduces connection sharing support in NetworkManager.

Comments and Discussion

See Talk:Features/ConnectionSharing