Networking :: static ip to a prism2 device



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

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

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

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?

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

Next Page...
original here.