omcaree Posted April 5, 2005 Report Share Posted April 5, 2005 Hey all, just a quick question that I'm sure will be easily solved. I have a wireless network set up using ndiswrapper and it all works fine (WEP and all). to bring the network up i use dhclient wlan0 which retrieves an IP from my router. is there any way to set a static IP and bring the network up? I tried using the manage connections and setting a static IP and then using either ifconfig wlan0 up or ifup wlan0 but neither of these bring up the connection. I'm new to linux so i'm probably doing something obvious wrong, so any help on the matter would be most welcome. Cheers Owen Mc Quote Link to comment Share on other sites More sharing options...
coverup Posted April 6, 2005 Report Share Posted April 6, 2005 ifup simply a script which executes some commands according to settings found in /etc/sysconfig/network-scripts/ifcfg-wlan0. To change wlan0 from using dhcp to a static IP address, edit that script. From the command line, login as root (su, password), then open /etc/sysconfig/network-scripts/ifcfg-wlan0 in an editor. Replace BOOTPROTO=dhcp to BOOTPROTO=static IPADDR=aaa.bbb.ccc.ddd NETWORK=aaa.bbb.ccc.0 (use your IPADDR address and NETWORK). Save, then restart the network using service network restart . To check if everything is okay run ifconfig, and try to ping your gateway. Edit: Make sure that the IP address you want to use is within the range set in your DHCP server. Edit: You can also use Mandrake Control Centre to switch to using a static ip address. Open MCC, then go to Network and Internet Settings, DrakeConnect, double click the wlan0 interface, change the protocol setting from dhcp to static and type in the ip address. Apply settings, and keep your fingers crossed, this should work as well. Just in case, backup /etc/sysconfig/network-scripts/ifcfg-wlan0 first Quote Link to comment Share on other sites More sharing options...
Qchem Posted April 6, 2005 Report Share Posted April 6, 2005 You may also need to set up /etc/resolv.conf for DNS resolution - this may magically just work however. Quote Link to comment Share on other sites More sharing options...
omcaree Posted April 6, 2005 Author Report Share Posted April 6, 2005 after editting /etc/sysconfig/network-scripts/ifcfg-wlan0 and restarting the network i have the same problem, the network wont come back up (cant ping anything). I get the same problem when I set the IP from the mandrake control center. I tried setting it to load on boot and restarting my machine, I get an "OK" under "bringing up wlan0" but then when i get into KDE, no such luck, network dead. I opened /etc/resolv.conf and this contains the correct settings so I cant see this being the problem. after setting everything back to DHCP it all magically works again. I really cant see where the problem is here. This isn't a huge problem because the network works fine on DHCP, but i'd like to set it up as static because thats what the rest of my network uses (all windows based i'm affraid :unsure: ). Any ideas much appreciated, otherwise i'll just live with DHCP Quote Link to comment Share on other sites More sharing options...
coverup Posted April 7, 2005 Report Share Posted April 7, 2005 after editting /etc/sysconfig/network-scripts/ifcfg-wlan0 and restarting the network i have the same problem, the network wont come back up (cant ping anything). I get the same problem when I set the IP from the mandrake control center. I tried setting it to load on boot and restarting my machine, I get an "OK" under "bringing up wlan0" but then when i get into KDE, no such luck, network dead. I opened /etc/resolv.conf and this contains the correct settings so I cant see this being the problem. after setting everything back to DHCP it all magically works again. I really cant see where the problem is here. This isn't a huge problem because the network works fine on DHCP, but i'd like to set it up as static because thats what the rest of my network uses (all windows based i'm affraid :unsure: ). Any ideas much appreciated, otherwise i'll just live with DHCP <{POST_SNAPBACK}> Try using the same static IP address that your box receives from the DHCP server. Also, as root, run ifconfig and route -n and post the output here. Post /etc/sysconfig/network-scripts/ifcfg-wlan0 as well. Somebody may be able to help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.