Bug 120630 - Profiles support for NICs
Summary: Profiles support for NICs
Status: RESOLVED WONTFIX
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: Network (show other bugs)
Version: Alpha 2
Hardware: All All
: P5 - None : Enhancement (vote)
Target Milestone: Alpha 0
Assignee: Christian Zoz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-06 13:59 UTC by Alexander Lavrinenko
Modified: 2007-10-09 11:16 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Lavrinenko 2005-10-06 13:59:58 UTC
Hello, 
 
I'd like to see profiles support for each NIC found by OS, including wireless. 
This is very useful for laptop users. For instance, I have 3 different LANs I 
can connect my wired NIC to and 2 different wi-fi spots as well. Each has 
different IPs/default gws/static or dhcp configuration but I use single NIC on 
my laptop to connect to all of them. Scripts can be integrated together with 
ifplugd and wpa-supplicant that will upon cable connect/passing wifi auth 
stage apply profiles to NIC and do basic tests (default gw ping, etc.) in 
order to find matching profile for current connection. If no suitable profile 
found scripts can default to dhcp. 
 
Right now I have to ifconfig/ip ro del/add manually, that really annoys me.
Comment 1 Christian Zoz 2005-10-11 08:37:31 UTC
What we currently have:
SCPM: switch between different configuration profiles (not only networking)
ifplugd: Goto YaST, network, special settings and set startmode to 'if cable
plugged'
We don't switch automatically between SCPM profiles currently.

In next release we will have NetworkManager which will scan wlan nets and switch
automatically if appropriate.
Comment 2 Alexander Lavrinenko 2005-10-14 07:55:52 UTC
Well, SCPM is not automatic and too complicated as of me. ifplugd works well, 
I'm using it right now for wired NIC. What I want to have: 
Currently ifplugd configures interface with only one settings (ip/def. 
gw/etc.) no matter which network the system (pc/laptop) actually connects to. 
 
I want ifplugd (or probably other scripts that are called by ifplugd) to check 
whether these network settings are correct for current LAN by pinging default 
gw, for instance, or by any other means. Then, is ping/other test fails, 
script should proceed to next network settings profile and check again. The 
last entry in network profiles can be configuring NIC with DHCP. 
 
This means that current network subsystem (initscripts/hotplug) has to be 
redesigned in order to handle multiple network profiles entered by user with 
YaST (and yast itself should be adjusted). 
 
Wireless NICs can be handled exactly the same except that before guessing 
network profile wpa_supplicant applies correct auth (AFAIK it supports wifi 
auth profiles). 
So the procedure can be like this: 
1. wifi card is RF swith on or cardbus/expresscard insert event 
2. hotplug calls wpa_supplicant 
3. wpa_supplicant walks tru wifi auth profiles (also provided by user with 
yast and stored somewhere) and applies relevant in a similar manner 
4. after auth is done ifplugd starts to apply network settings one-by-one 
until success or ending up with DHCP 
5. done 
 
Advantages compared to SCPM or NetworkManager: 
1. it works at very low system level, and will work with no desktop/X11 
installed. 
2. we already have hotplug/ifplugd/wpa_supplicant, we just need to add 
profiles support for wpa_supplicant if needed and relevant script that handles 
profiles. 
3. network configuration becomes system-wide. 
 
Addons that I'd like to have as well: aliases support in each profile and 
configure them with yast. 
 
Comment 3 Christian Zoz 2005-10-14 11:10:04 UTC
Robert, what do you think about that?
Comment 4 Alexander Lavrinenko 2005-10-16 08:51:55 UTC
Additional note relevant to wired NICs: some managed switches take more time to put switch port into operational mode due to spanning-tree algo (almost all cisco catalysts, despite of "spanning-tree uplinkfast" config option). So in order not to skip correct profile, profile-chooser script can behave in two ways:
1. smart one - check with tcpdump'ing the NIC for spanning tree packets and wait some defined time;
2. dumb one - provide option "Wait for spanning-tree negotiation timeout" in YaST when configuring particular network profile.

Yet another possible race condition:
profile can have no default gateway defined, just IP and netmask. I think this is rare case and we can force user to provide default gw for each profile except DHCP (that in turn can be added automatically as the last profile if user has choosen network profiling support in yast). Logic to handle default-gateway-less profiles can be added in future.

Possible algo on yast network configuration:
1. on network configure step yast offers user two ways, exsisting one (no profiles support), and new one (profiles support).
2. if user chooses profiles support, yast obtains IP/mask/def.gw./additional aliases from user for each profile until "done editing profile" button pressed.
3. if no default gw entered yast warns user and prevents to commit current profile and step creating to next one.
4. DHCP profile is not offered to user and added automatically to the end of profiles list stored somewhere in /etc/sysconfig/network/ in order to avoid situations when user configured DHCP in the middle and profiles created after DHCP-one are never reached.

More thoughts to come...
Comment 5 Alexander Lavrinenko 2005-11-11 12:19:26 UTC
Hello,

please update status of this feature request, seems that it hang...

Thanks in advance,

Alex
Comment 6 Stefan Behlert 2005-11-24 11:23:36 UTC
I think we cover this with 10.1 and NetworkManager (at least partially).
Comment from Robert and Timo welcome.
Comment 7 Alexander Lavrinenko 2006-01-23 12:45:54 UTC
Ok, let's suspend this feature request for post-10.1 release.
Comment 8 Christian Zoz 2006-04-12 14:06:12 UTC
.
Comment 9 Christian Zoz 2006-04-12 14:08:58 UTC
There will be a new solution for code 11. I added your request to the list of wanted features.

For current network setup: There is NetworkManager and SCPM. So this won't be added to the old code.
Comment 10 Alexander Lavrinenko 2007-10-08 19:09:39 UTC
Well, code 11 development has started, as I guess. 2 years have passed, I think it's time to re-open this feature request. I've done some initial tests of this concept with success. All of my modifications took place in /etc/sysconfig/network/scripts/ifplugd-selectif, but, to my shame, got lost during latest system update :(
Comment 11 Christian Zoz 2007-10-09 11:16:29 UTC
We will not integrate that in the sysconfig network scripts. This use case is managed with NetworkManager. So please ask on the NetworkManager mailinglist for profile management.