Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Apr 2014, 12:21
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Dingo Network AutoDHCP function impacts network management
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Author Message
rerwin


Joined: 24 Aug 2005
Posts: 1468
Location: Maine, USA

PostPosted: Thu 03 Jan 2008, 00:08    Post subject:  Dingo Network AutoDHCP function impacts network management
Subject description: Dhcpcd version 3.x changes the assignment of IP addresses, impacting LAN management; solution here.
 

NOTICE: Please download the localized version later in this thread, for use with Puppy 4 alpha 5. But the version in this post is still good, too.

Dingo 4a4 contains dhcpcd 3.1.8, which defaults to using a new (IPv6-specification) client ID format that some router firmware does not support. Those routers expect the client ID to be the MAC address of a PC's network interface adapter and permit control of connectees by those addresses. An option that allows Puppy to use either the old or new defaults would remedy that problem, while letting Puppy keep up with new versions of dhcpcd.

The new default format appears to be intended to simplify network maintenance by identifying a workstation (PC) by software installation, wherein all interfaces (wired, wireless, USB) have the same client ID, so the administartor sets up filters (or whatever they use) for the PC and not separately for each network interface. The assumption, probably, is that a PC will contain only one software system, so a client ID represents an OS and the computer containing it.

But in the Puppy Linux world it is common for several instances of Puppy to reside in the same machine; each pup-save file or partition constitutes a separate system, each with its own client ID and IP address (under Puppy 4.x). Instead of identifying itself, by interface, as 1-to-3 entities (client IDs), a PC hosting, say, ten Puppys would have ten client IDs for one PC, complicating LAN management rather than simplifying it! Each live-CD boot creates a new client ID (and IP address); saving to a pup_save file/partition creates a second ID upon first reboot with the pup_save. This profusion and discarding of so many client IDs/IP addresses could be eliminated if the network wizard would manage the client IDs so that all Puppys within a partition would use the same ID.

The new client ID format makes possible some benefits mainly for large network installations. Identifying a PC as a single entity is one; another is that changing out NIC hardware does not impact the client ID (where previously the changeout would also change the client ID (MAC address), necessitating an administrative chore. Since there may be Puppy users interested in these capabilities, and since other OSes cohabiting with Puppy might adopt the new format, it is reasonable to adapt Puppy to accommodate it with minimal disruption to LAN management.

I have worked up a solution to these issues and offer it for evalutaion and consideration for integration into Puppy. With it, the main network-wizard window contains a checkbox that enables use of the new format; unchecked, the old MAC-address format is retained. When checked, the basis for a single client ID ("duid") is retained at the root of a partition and is used for all DHCP requests for all Puppys in that partition, on all interfaces. This assumes that only one Puppy at a time is ever active in that partition.

Attached are the changed scripts (/usr/sbin/net-setup.sh & /etc/rc.d/rc.network) and highlighted (4alpha 394) listings of them showing the modifications. They are NOT compatible with pre-3.0 versions of dhcpcd, found in most pre-4.0 Puppys; I have tested with the dhcpcd 3.1.8 in Puppy 4 alpha4 (394).
EDIT: Refined version uploaded on 1/4/08.
EDIT: Armor-plated version uploaded on 1/5/08 (10 p.m. EST). Backward compatible with old dhcpcd 1.3.22.
EDIT: Uploaded updated rc.network on 1/9/08 (10:45 p.m. EST); net-setup.sh unchanged.
EDIT 1/11/08: Now that localization improvement has been merged with this fix, Please download the archive from the post near the end of this thread, for use with Puppy 4 alpha5.

Richard
net_wiz_clientid_fix.tar.gz
Description  Scripts & listings of network wizard and bootup scripts, to accommodate both IPv6 and IPv4 client ID formats.
gz

 Download 
Filename  net_wiz_clientid_fix.tar.gz 
Filesize  65.18 KB 
Downloaded  838 Time(s) 

Last edited by rerwin on Fri 11 Jan 2008, 11:04; edited 5 times in total
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Thu 03 Jan 2008, 20:37    Post subject:  

Richard,
In the 'config.h' file in the dhcpcd source, it has this:

/* We will auto create a DUID_LLT file if it doesn't exist.
* You can always create your own DUID file that just contains the
* hex string that represents the DUID.
* See RFC 3315 for details on this. */
#define ENABLE_DUID

I left that line in, but how would it affect things if the line was commented out? Would that improve the situation? How would commenting it out affect your mods?

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
rerwin


Joined: 24 Aug 2005
Posts: 1468
Location: Maine, USA

PostPosted: Fri 04 Jan 2008, 12:08    Post subject:  

Barry,
Thanks for getting back to me so soon. I assume that commenting out the #define statement would omit the duid/IPv6-compatibility logic entirely, with the same effect as adding the "-I ''" parameter for the current version of dhcpcd. But the omiision would prevent anyone from interfacing correctly with the modern DHCP servers. Although I have been encouraging you (and Dougal) to remain with the old, MAC-address client ID, I recognize that we should eventually step up to the "state of the art" if we are going to use the latest versions of dhcpcd. (I base my position on tempestuous' findings at http://www.murga-linux.com/puppy/viewtopic.php?p=143233&search_id=2134610141#143233, and the link he provides.)

I favor making Puppy as compatible with the world as we can, which means making it IPv6-compatible. Instead of attempting to hold back progress, I found a way to "modernize" Puppy without impacting the older networking equipment that frugal Puppians probably use.

To answer your question directly -- the impact of removing the new compatibility in dhcpcd -- my mods would be completely unnecessary. If my mods were put in for future activation of compatibilty, we would need to make sure that dhcpcd could still handle the "-I ''" parameter correctly (as dhcpcd 1.3.22 does NOT). We would also need to address the new checkbox, which would become ineffective. Should it be removed? Or be made to reject being checked? Maybe it would (or could be made to) function the same no matter what the checkbox contains.

So, now that I have "bought into" the new compatibility, I think the better route is to make Puppy future-compliant.

(BTW, I have uploaded a refined version of the mods.)
Richard
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sat 05 Jan 2008, 05:59    Post subject:  

Okay, I'll "bite the bullet" then. I've downloaded your mods and put it into the to-do-soon list.
_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
rerwin


Joined: 24 Aug 2005
Posts: 1468
Location: Maine, USA

PostPosted: Sat 05 Jan 2008, 23:49    Post subject:  

Barry,
Thanks for accepting this fix. Before you work on it, please check my initial post for an updated version. I just uploaded a more robust package that also works with the old version of dhcpcd; it does not support the duid for the older version (of course), just ignores and clears the checkbox setting. However, although it can handle the presence of both the /etc/dhcpc and /var/lib/dhcpcd directories, the upgrade process should probably remove /etc/dhcpc so that the wizard produces the expected result when the box is not checked.
EDIT: To clarify the extent of backward compatability, the fix works with dhcpcd versions 3.1.8 and 1.3.22, which are in Puppy 4.x and 3.x, respectively. The wizard itself does not start at all in Puppy 2.x and 3.01-Retro -- it must be a kernel thing.

Now, if you change the checkbox value after setting up the interfaces, nothing changes until either a reconfigure of the interfaces or a reboot -- the reboot sets all interfaces the same way (DUID or MAC), per the setting in the checkbox.

BTW, I would like to test the case where the eth0mode file s set to "auto"; but I do not see where that is done. Is that obsolete or is it set externally to the wizard? I could create it manually, but I would like to know how it is actually used.

EDIT: for those who know what it means, the fix allows Puppy to identify itself to the network with an IPv6-compliant client ID.
Richard
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Tue 08 Jan 2008, 08:35    Post subject:  

Rerwin, there's something I was wondering about in relation to IPv6:
rc.sysinit has a part where some number is echoed into a file in /proc/sys/net/ip4 or something.
Will something have to be added for IPv6, too?

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1468
Location: Maine, USA

PostPosted: Tue 08 Jan 2008, 13:14    Post subject: rc.sysinit IPv4 question  

Dougal,
The comment before the second rc.sysinit instance of writing "1" into the file in directory ipv4 implies that it relates to dialup, but there is nothing about why it is done. I have no insight into it. I do see in Puppy4 that there is no counterpart directory ipv6. That area goes beyond where I was working. So far, I have not tried puppy4 with a modem; a4 does not recognize my Intel 835ep chip. But I have other modems to try.

In reality, I do not know whether the promised capability to associate multiple intefaces with the same PC actually works. That is the dhcpcd developer's responsibility. I just added the option to use either type of client ID and to propagate the duid across multiple instances of Puppy.
Richard
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Tue 08 Jan 2008, 20:35    Post subject:  

I localized the network-wizard, see:

http://puppylinux.com/blog/?p=112#comment-569

Mark
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 09 Jan 2008, 08:49    Post subject:  

MU, yes, the latest version of the network wizard is that posted by rerwin. This was prior to your localisation-finished announcement ...would it be possible to synchronise these two? Actually, rerwin has very clearly indicated in net_setup.sh where he has made the changes.
_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
rerwin


Joined: 24 Aug 2005
Posts: 1468
Location: Maine, USA

PostPosted: Thu 10 Jan 2008, 00:24    Post subject: Updated rc.network (only)  

Barry, Mark,
I have just now uploaded the archive with an updated version of rc.network. I have not changed net-setup.sh, as I know MU may be integrating it with his localization code.

I became concerned about the possibility of ending up with the same DUID in multiple PCs, due to using Puppy on portable media. We should not propagate a common DUID beyond a partition, into other PCs. But a portable Puppy could have its unique DUID, as long as it is different from any on a PC.

I coded for that (and tested on a hard drive), but have not tried the fix with installs to flash drives or multisession CDs. I understand that alpha4 has problems with some of those options, so I will wait for alpha5, to do the "fine tuning". The default, older (MAC address) client ID can be used in those cases, until we work out a process for the new IDs.

A write-up will probably be appropriate, to set guidelines for client IDs and portable media. (I can do that.)

BTW, in the listing for net-setup.sh I highlighted lines 961 & 962 in red. They can be deleted, as their function is now done in rc.network. Feel free to remove them while integrating the scripts into Puppy. The lines to remove are:
Code:
   (961)  [ ! -d /var/lib/dhcpcd ] && mkdir /var/lib/dhcpcd
   (962)  [ -s /root/.dhcpcd.duid ] && cp /root/.dhcpcd.duid /var/lib/dhcpcd/dhcpcd.duid

Richard
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 10 Jan 2008, 11:37    Post subject:  

In my update line 60 the german and english variables were mixed:
"NOINTERFACES"=

The german was in the english mo and vice versa.
I updated the archive.
But my archive still contains the old version.
PLEASE use this bugfixed version as a base for further changes.
It is easier for people who write patches to integrate them in the localized script, than the other way round.


If you need translations, I can provide them of course.
I just have seen the last messages now, so it is very likely I will oversee further addons. I just saw them because I wanted to announce my "bugfix".
So I prefer not to be involved in the development of this script.

The way I added the localization also allows you to ignore translations.
Put strings in a new variable, and add it in the english .mo.
Then that english text will be used also in the german one, until someone adds the translation to the german .mo.

The english file is loaded first, then the one from the country-settings, which then will replace variables that are translated.
Non-translated variables will be displayed in english.

Like this you can code without having to care for the translations themselves.

Mark
Back to top
View user's profile Send private message Visit poster's website 
rerwin


Joined: 24 Aug 2005
Posts: 1468
Location: Maine, USA

PostPosted: Fri 11 Jan 2008, 01:17    Post subject: Merged net-setup.sh for alpha5
Subject description: Lacks 2.95 fix & needs localization addition
 

Mark,
Here is the merged set-setup I promised. My code includes a label in line 244 that probably needs translation:
Code:
<label>Identify all interfaces to the network as representing the same computer.</label>

Richard
net_wiz_clientid_fix+localization.tar.gz
Description  Candidate for alpha5 if fix 3.95 gets added and a localization instance gets added.
Contains net-setup.sh and corresponding rc.network scripts.
gz

 Download 
Filename  net_wiz_clientid_fix+localization.tar.gz 
Filesize  82.96 KB 
Downloaded  805 Time(s) 

Last edited by rerwin on Sat 12 Jan 2008, 13:36; edited 1 time in total
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 11 Jan 2008, 01:27    Post subject:  

Great!
Here is the translation:

Code:
<label>Identify all interfaces to the network as representing the same computer.</label>


Code:
<label>Alle Interfaces dem Netzwerk gegenüber als denselben Computer darstellen.</label>


Mark
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 11 Jan 2008, 01:42    Post subject:  

added the localization, archive attached.
It also includes the .mo files.
Mark
net_wiz_clientid_fix+localization2.tar.gz
Description 
gz

 Download 
Filename  net_wiz_clientid_fix+localization2.tar.gz 
Filesize  67.39 KB 
Downloaded  773 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
rerwin


Joined: 24 Aug 2005
Posts: 1468
Location: Maine, USA

PostPosted: Fri 11 Jan 2008, 10:36    Post subject: Merged version tests successfully!  

Mark,
I have tested your uploaded archive and all runs as it did with my fix alone. I do not know how to test localization.

I am concerned that the translation of my new label is 6 characters longer than the original, and that it will exceed the space for the label. Can you test this by starting the network wizard and checking the appearance of the checkbox text. Maybe we need space for a second line. Easy to fix, I think.
Richard

Last edited by rerwin on Sat 12 Jan 2008, 13:34; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0854s ][ Queries: 12 (0.0052s) ][ GZIP on ]