static ip to a prism2 device


Forum: Networking
Topic: static ip to a prism2 device
started by: irun5k

Posted by irun5k on Jan. 03 2008,10:54
My prism2 USB wireless device works with my HD install of DSL as long as I use DHCP.  It took me a good while to realize why wireless was still using DHCP even when I turned DHCP off everywhere else- it is the last line of prism2.sh- the pump command.

So when I remove pump and add commands to bootlocal.sh to bring up a static address, I can ping myself but not the gateway or anybody else.  Also when I run "route" it takes a really long time to return, but when it returns it shows me my correct default route in addition to a 192.168.0.1 route.

In bootlocal.sh, I do:

Code Sample
ifup wlan0
ifconfig wlan0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
route add default gw 192.168.1.1


I've tried changing the order of the commands, and using variations, but no dice.  Yes, my addresses are correct and no, nobody has .100 on my network.  Also, my resolv.conf is set up correctly.

I've done my homework on this one but seem to be hitting a brick wall.  Is there some sort of issue with prism2, static IPs, and DSL?  For my purpose it is mandatory I have a static IP, and my router can't do static assignments based on mac addresses.

sadly, I'm still using DSL .8 :(.  If possible, please refrain from suggesting an upgrade to fix this- given the nature of what i am doing that is not easily done.  

thank you in advance

Posted by ^thehatsrule^ on Jan. 03 2008,14:46
Quote (irun5k @ Jan. 03 2008,05:54)
In bootlocal.sh, I do:

Code Sample
ifup wlan0
ifconfig wlan0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
route add default gw 192.168.1.1

Did you try running "ifup wlan0" or "ifconfig wlan0 up" at the end instead of the beginning?  You could also try running netcardconfig instead.

If it still doesn't work maybe paste your output of /etc/network/interfaces

Posted by irun5k on Jan. 03 2008,17:34
Hi there,

I did try switching the order of ifup wlan0, but no dice.  I've also run netcardconfig, but it didn't help.  Below is the content of the interfaces file.

Code Sample
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo wlan0
iface lo inet loopback

iface wlan0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1


output of route:
Code Sample
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0
default         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0


ifconfig also shows my interface as being up with the correct IP, but nobody can ping me and I can only ping myself (192.168.1.100.)

The only thing I'll mention is that I'm doing all this in bootlocal.sh AFTER I make the call to myprism2.sh.  I think, I have no choice here because I don't actually have a wlan0 until running the commands in myprism2.sh/prism2.sh?

Thanks

Posted by ^thehatsrule^ on Jan. 03 2008,18:48
Is pump still running? If so, you can use killall pump or boot with nodhcp.  It could cause a conflict...
What's in myprism2.sh?

Posted by roberts on Jan. 03 2008,22:24
My netgear MA111 usb wireless, a prism2 device, works fine with static ip.
These are the commands that I use as root.

1. edit /usr/local/bin/prism2.sh to remove the last line, the pump -i

2. /usr/local/bin/prism2.sh wlan0  11  essid  key_code_in_colon_pairs

3. ifconfig wlan0 ip 192.168.1.49
4. route add default gw 192.168.1.254
5. echo nameserver 192.168.1.254 > /etc/resolv.conf

That's it. I do not use ifup. I also boot with nodhcp.

HTH

Posted by roberts on Jan. 04 2008,01:04
My prism2 also works using:

1. edit /usr/local/bin/prism2.sh to remove the last line, the pump -i

2. /usr/local/bin/prism2.sh wlan0  11  essid  key_code_in_colon_pairs

Then use the necardconf.lua GUI.
Set device as wlan0 and select and enter static IP, and finally the nameserver.

Posted by irun5k on Jan. 04 2008,23:23
Thanks for the help guys.

I ran through everything again, and the only thing (that I'm aware of) that I did differently was- I added the "ip" argument to

ifconfig wlan0 ip 192.168.1.100

Previously, I had "ifconfig wlan0 192.168.1.100".  I didn't realize that "ip" was a required argument- could almost swear I've seen it ommited before.

So, its working now, thanks for the replies.  DSL is great and I've used it for years, so it is probably a little late but I just donated some $$.  Sometimes you hear a phrase, "Freedom isn't free."  Well, "Open software isn't free, either."  The people working on open source stuff are usually high caliber guys who are presumably giving up income by volunteering.  So it is free to you but it is costing someone.  Sorry to go off track but it is good to be reminded of this once in a while  :)

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.