revised Network Wizard + dhcpcd Aug 24 2007

Stuff that has yet to be sorted into a category.
Message
Author
tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

revised Network Wizard + dhcpcd Aug 24 2007

#1 Post by tempestuous »

Network Wizard
1. As well as identifying the network interface by name, the wizard now also identifies the brand/model of the device, and whether the interface is LAN or wireless.
2. Support for WPA and WPA2 encryption, and the wizard will only permit these settings if the wifi module in use is compatible.
3. Support for the configuration of the prism2_usb module, which uses unconventional setup commands. And scanning also works with prism2_usb.

Update October 7 2007
- support added for ALL prism2 wifi modules (not just prism2_usb).
- WPA support added for Realtek r8180 and r8187 wifi modules.
- WPA support added for zd1211rw (Zydas) module.

Thanks to Dougal for many scripting revisions, and JustGreg for testing the WPA2 function.
The package is over 100KB because it contains lsusb plus the relatively large configuration file needed by lsusb.
For Puppy versions earlier than 2.17, the "Autoload USB" function requires the additional net-wiz-usb-extras-k2.6.18.1.pet

Puppy v3.00 now contains a revised version of this wizard, with a slightly different main interface, and without the lsusb components.

For Puppy versions earlier than 2.17, the "Autoload USB" function requires the additional net-wiz-usb-extras-k2.6.18.1.pet
Attachments
network-wizard-Oct07.pet
for Puppy 2.17
(115.93 KiB) Downloaded 1191 times
net-wiz-usb-extras-k2.6.18.1.pet
to use new Network Wizard with Puppy versions 2.12 - 2.16
(12.12 KiB) Downloaded 1219 times
Last edited by tempestuous on Sun 07 Oct 2007, 02:25, edited 1 time in total.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#2 Post by tempestuous »

dhcpcd in Puppy 2.17.1 (but not 2.17) is BROKEN!
This is a major problem, which I announced as soon as it was identified -
http://www.murga-linux.com/puppy/viewto ... 977#133977
but the information seems to have gone largely unnoticed.

Here is the fixed version, which will now save its configuration files to the correct location: /etc/dhcpc/
expected by Puppy's various network setup scripts.
Attachments
dhcpcd-3.1.4.pet
(26.55 KiB) Downloaded 1338 times

jonyo

#3 Post by jonyo »

Will this work in puppy 98? (1.07 based I think)

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#4 Post by tempestuous »

The Puppy 1.x series contains no third-party wifi drivers, so the Wizard will obviously not be able to set up drivers which are not present.
But the Wizard should work OK with the small number of "standard" wifi drivers, plus all of the ethernet drivers.

jonyo

#5 Post by jonyo »

Can the net wiz setup using ndiswrapper in 1x variants?
Last edited by jonyo on Sun 26 Aug 2007, 20:49, edited 1 time in total.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#6 Post by zigbert »

Thank you

This upgrade made this wizard easy understandable for us not-so-smart-guys.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#7 Post by tempestuous »

jonyo wrote:Can the net wiz setup using ndiswrapper in 1x variants?
Probably. But I understand that ndiswrapper requires perl as well.
Since you have to go to some effort to install extra packages (perl + Windows driver) it would make more sense to install the correct Linux drivers.
Linux wifi drivers compatible with Puppy versions 1.0.4 - 1.0.9 are here http://dotpups.de/dotpups/Wifi/drivers-for-Puppy-1/

Your Netgear MA401 is supported by the orinoco_cs module or hostap_cs module. The hostap_cs is a better choice, so unload (or blacklist) the orinoco_cs first.
http://dotpups.de/dotpups/Wifi/drivers- ... 4.7.tar.gz
http://dotpups.de/dotpups/Wifi/drivers- ... tap_README

Your D-Link DWL-G122 b1 USB is supported by the rt2570 module.
http://dotpups.de/dotpups/Wifi/drivers- ... acy.tar.gz
http://dotpups.de/dotpups/Wifi/drivers- ... ink_README

jonyo

#8 Post by jonyo »

Thx mucho. :) Turns out to be some very timely info. Have pup 98 up & running on this ibm 380 ed lap p150 80 megs ram (booted but hung to an error with 32 megs of ram). Ordered & took ~ 2 wks the get some ram to max it out at 80 megs. Took a chance on that cos the lenovo site sez the lap maxes out at 48 megs but 80 is working out (..makes me wonder if it might take more). Runs pup 98 real good this way & still sortin out the wifi on that (& swap partition).

The other interesting thing is that the lenovo site sez that the lap wont boot from cd & for the most part it doesn't but turns out it does boot off some cds..Gparted for one (but not to a start screen) & win 98..

Some other interesting things is that messin around, turned out that it booted some (not all..tried a bunch) earlier variants of 2x~0-1 pups (with 32 megs) to a start screen (but barely ran..sloow) with a wake floppy but ended up with a cheezy green screen with xvesa (xorg wouldn't work). So was waiting for the additional ram to see what diff that might make. Made all the diff as I can boot to a A-1 start screen with xorg. :) I was focusing on early variants 2x as they were the only ones that would boot via wake floppy. Tried out a few others that were kicking around 2.13-5-6 & couldn't get a boot (& wonder why :?: :roll:). Ended up trying 2.17 & boom :shock: got a boot so along with win & pup 98, got 2.17 setup live cd & its workin pretty good..considering..so far. Tried to set up a swap partition but some error is coming up that I haven't sorted out.

On to the wifi. Lap has no usb port :( so going with the netgear MA 401, - 2.17 auto loads orinoco_cs. Scan shows my wifi but as soon as I try auto dhcp (not sure but think I'm on 2.17) in the net wiz..loose the wifi & rutilt wont open..shows errors. So blacklisted that & went with the hostap_cs. After loading, no wifi interface shows up & get - critical error: Can't find any wireless network interface. Code: -3. What to do next?

Edit - Tried out all the win .inf files & none brought up a wifi interface though they loaded. Dunno how to unload them or if that may be a prob here.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#9 Post by Sit Heel Speak »

@tempestuous:

Thank you for fixing dhcp in 2.17.1.

Your revised Network Wizard, like rarsa's before it, still does not allow what I want:

I have one internal nic (eth0) going to a dsl "modem."
--the modem is 10.0.0.2 and assigns IP's via dhcp.
--so, I wish to be able to use AutoDHCP on this nic.

I have a second nic (eth1) going to the rest of my internal network, as well as to a separate proxy machine.
--this nic is 192.168.1.7, static.
--its proxy machine is 192.168.1.11.
--the proxy is also this card's gateway and DNS nameserver.
--therefore, for this card, I would like to be able to set gateway and DNS servers independently of eth0, i.e. not to 10.0.0.2 but rather to 192.168.1.11.

Possible?

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#10 Post by tempestuous »

First, it's not my wizard. The current wizard is still based on rarsa's code, with extensive enhancements by Dougal.
I just coordinated the recent testing and feedback.

I'm not sure if the wizard can accommodate multiple network interfaces. Dougal could probably answer this, but since you obviously know something
about network configuration and commandline usage, I suggest you forget about the wizard (it's just a simplified tool for newbies) and instead run
the necessary commands.
Once it's working, you can create a script which sets up your configuration at each boot up.

The connection to the modem should be quite easy -

Code: Select all

dhcpcd eth0
For your LAN connection I think this is what you need (anyone else feel free to jump in)
First modify /etc/resolv.conf to include ONLY this -

nameserver 192.168.1.11

Now run these commands -

Code: Select all

ifconfig eth1 192.168.1.7 broadcast 192.168.1.255 netmask 255.255.255.0
route add default gw 192.168.1.11 eth1
Now keep in mind that every time the dhcpcd command is run to set up eth0, it will mess up the gateway and DNS addresses set for eth1.
I see that there are some parameters which can avoid this -

-R Prevents dhcpcd from replacing existing /etc/resolv.conf file.
-G [gateway] Prevents dhcpcd from installing default routes provided by DHCP server.

But Puppy's startup script does run dhcpcd, and it will continue to do its own thing (unless you modify it) so it will probably still be necessary to run the eth1 commands each time, and recreate the /etc/resolv.conf file.

jonyo

#11 Post by jonyo »

tempestuous wrote:but since you obviously know something
about network configuration and commandline usage, I suggest you forget about the wizard (it's just a simplified tool for newbies) and instead run
the necessary commands.
I'm not familiar with the commands & if the gui doesn't work I'm quite lost in sorting it out. Can't say I've run across some good info on it pup but I may have missed it. Is it available somewhere?

Best info I've run across thus far are here.
https://help.ubuntu.com/community/WifiD ... otingGuide

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#12 Post by Sit Heel Speak »

tempestuous wrote:...First, it's not my wizard...
My apologies for the mistaken identity. Thank you rarsa and Dougal!
tempestuous wrote:Once it's working, you can...
Aha--the fog lifts. For all my alleged prowess, I was unaware of the route command and the existence of what route modifies, namely the kernel's internal routing table--it was mystifying me that there is no configuration file for specifying gateway IP's in /etc, in Puppy. Thereby I was mistakenly assuming that Puppy is mistakenly assuming that the nameserver(s) listed in resolv.conf are also the gateways. Silly me.

So if I catch your drift, at the end of rc.local I can accomplish what I want by inserting this:

Code: Select all

#the below would solve the nameservers problem
echo nameserver 192.168.1.11 > /etc/resolv.conf
echo nameserver 10.0.0.2 >> /etc/resolv.conf
#the below would specify that
#only eth0 uses 10.0.0.2 as its gateway 
#and
#only eth1 uses 192.168.1.11 as its gateway
ifconfig eth0 dhcp broadcast 10.0.0.255 netmask 255.0.0.0
route add default gw 10.0.0.2 eth0
ifconfig eth1 192.168.1.7 broadcast 192.168.1.255 netmask 255.255.255.0 
route add default gw 192.168.1.11 eth1
Yes? I'll try it on the target computer, just as soon as it finishes the auto-compile under that other distro of kde...

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#13 Post by tempestuous »

Sit Heel Speak wrote:ifconfig eth0 dhcp broadcast 10.0.0.255 netmask 255.0.0.0
I don't think that the command you suggested will obtain an IP address, because "dhcp" is not a valid parameter for ifconfig.
For eth0 I think you need to use the dhcpcd command, like this -

Code: Select all

dhcpcd -R -G eth0
route add default gw 10.0.0.2 eth0
I just tested these commands now, they seem to work. Of course, if Puppy automatically runs dhcpcd at bootup, you will first need to kill this process.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#14 Post by tempestuous »

Wait, now that I look at it, we're being too complex.
All you should need to do for eth0 is this -

Code: Select all

dhcpcd -R eth0
dhcpcd will configure the IP address and gateway for eth0. The -R is so that it won't overwrite /etc/resolv.conf

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#15 Post by Sit Heel Speak »

Thanks again...I may get a chance to try this, twelve hours from now. The kde compile referred-to above stymied me, until I by sheer luck found an old post (not this forum) telling me that, in that other distro, if I have auto-updated python, which happens during the autocompile of kde as a side-effect of the included attempt to update cfg-update...at a certain point I will get an error message telling me that the compiler can't find libxml2...at which point merely recompiling libxml2 doesn't solve the problem--I must first run python-updater...and then remove the zlib USE flag and then redo the compile of cfg-update...and maybe libxml2, I forget, it was 1AM by that point and I could hardly see straight...before resuming the compile of kde...how on Earth does Barry do it...anyway, I've done all that now, and kde finished successfully compiling overnight...but now it is morning, and She Who Must Be Obeyed is busy on that machine...and I must go pay my weekly social calls on my mom and sister...I don't mean to sound like I am in any way disappointed or frustrated with my beautiful, charming, gracious female relatives...

nic2109
Posts: 405
Joined: Mon 01 Jan 2007, 20:24
Location: Hayslope, near Middlemarch, Midlands, England

#16 Post by nic2109 »

Post deleted as it was in the wrong thread.

Thanks.
Last edited by nic2109 on Wed 12 Sep 2007, 20:45, edited 1 time in total.

jonyo

#17 Post by jonyo »

tempestuous wrote:Your Netgear MA401 is supported by the orinoco_cs module or hostap_cs module. The hostap_cs is a better choice, so unload (or blacklist) the orinoco_cs first.
Just found out that orinoco_cs doesn't support wep.:( Did a search of ma401 & suppose the few that have got it to work did so with an open wifi network.

Can't say I saw any mention of hostap_cs? What's the story on "is a better choice"? Tried it though on a few pup variants & loaded ok but didn't get a wifi interface afterwards. Don't suppose it (or might there be any other 16 bit pcmcia card that) supports wep 64?

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#18 Post by tempestuous »

The Netgear MA401 contains a Prism2.5 chipset.
The hostap driver is a better choice because it was specifically written for this chipset, the orinoco driver was not.

If the wizard fails, use the commandline.
First make sure the orinoco_cs module is unloaded -

Code: Select all

rmmod orinoco_cs
Now load the hostap_cs module, and force its mode to "managed" -

Code: Select all

modprobe hostap_cs
ifconfig wlan0 up
iwconfig wlan0 mode managed
ifconfig wlan0 up
Check that an interface has been created -

Code: Select all

ifconfig -a
If you don't see a wifi interface listed (wlan0) then you have problems.
If you do see wlan0 listed, proceed to configure your ESSID and WEP key -

Code: Select all

iwconfig wlan0 essid MY_ESSID
iwconfig wlan0 key open MY_HEX_WEP_KEY
Now obtain an IP address with dhcpcd

Code: Select all

rm /etc/dhcpc/*.pid
dhcpcd -t 30 -h puppypc -d wlan0

jonyo

#19 Post by jonyo »

thx

Tried it out in 2.14 & 5. With both after ifconfig wlan0 up, come up with SIOGIFFLAGS: No such device

Tried it out with eth0 instead & same thing.

Strange.. neither auto loaded orinoco_cs on boot like they did before though i've been trying all this live cd in ram..

Have to head out to work..

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#20 Post by tempestuous »

jonyo wrote:SIOGIFFLAGS: No such device
Mmm. This means that your device does not contain a Prism2x chipset.
Maybe there's a variant of the MA401?
Please run these commands, and paste your results.

Code: Select all

cardctl status
cardctl ident
cardctl info
We're looking for your device id number. This will enable us to determine precisely what chipset is in your MA401, then we will know what driver is suitable.

Post Reply