LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   automatic connection to network (https://www.linuxquestions.org/questions/linux-networking-3/automatic-connection-to-network-344125/)

jiante 07-17-2005 09:44 PM

automatic connection to network
 
i am a linux newbie and i'm pretty sure this question has been asked before, however i do not really understand the instructions to connecting my wireless adapter to my network.

I am using a linksys wusb11 and installed knoppix to my harddrive.

I have altered my etc/network/interface to set it to the correct essid and mode.
But whenever i restart my computer and want to use the internet connection, I have to log on as root and type

pump -i wlan0

to connect my adapter.

Is there any automatic way to do it?

peter_robb 07-18-2005 08:39 AM

Your /etc/network/interfaces file should have these lines..

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp

See man interfaces for more details..

jiante 07-18-2005 10:47 PM

where should i put the 3 lines?
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp


my current configuration is
auto lo
iface lo inet loopback
wireless_mode managed
wireless_essid mi_network
wireless_channel 11


however, when i change it to
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid mi_network
wireless_channel 11


the adapter is still not detected.

What is man interfaces?

motub 07-21-2005 06:57 AM

man interfaces is the MANual for the interfaces configuration file. Almost all programs have a MANual PAGE as documentation, and any program or system config file you don't understand, you should always try typing man <program_name> into a terminal and see if you get some instructions. This is what we mean when we say "read the man page".

Secondly, I don't think you were supposed to change your current config and replace what was currently there with the three additional lines; I think you were supposed to add the additional lines to the end of the file. Since the last lines are already talking about wireless, adding the new lines after them seems reasonable enough. You definitely need "auto lo", and shouldn't remove it.

What distribution are you using (please fill in the "Distribution" field of your profile)? Does it by chance have a Control Center or system management tool that contains a network configuration utility?

And read man interfaces. It will probably be very technical, but it will probably also explain everything that is explainable about the file.

It will probably also tell you if you can add pump -i wlan0 to the interfaces file, so that it will be run automatically when you boot and the file is read.

jiante 07-22-2005 03:30 AM

I am using knoppix v3.7

after adding the 3 lines, and restarting my computer, i discovered that instead of just typing pump -i wlan0, i still have to change my essid and mode back to my original essid as it is no longer retained.

i have tried putting pump -i wlan0 at the end of my interfaces file before but it doesn't work. And my man interfaces doesnt have must to do with wireless devices. Do i have to set my device to static? and set my IP address too?

fr_laz 07-22-2005 04:35 AM

Hi,

here's how your conf file should look:
Code:

auto lo
iface lo inet loopback

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid mi_network
wireless_channel 11

as for changing to static IP addressing, it depends whether there's a dhcp server on your wireless network. A dhcp server is a machine (a router, or a PC, or lot's of other things) that will give your PC an IP configuration when it requests one (when your network interface comes up).
so if you have such a dhcp server, you can keep your config in dhcp, if not, you have to set it up statically...
but as you told that it worked through doing a pump -i wlan0, then you must have a dhcp server, since it worked without you configuring IP address & mask.

peter_robb 07-25-2005 03:57 AM

Take a look at the Knoppix docs about saving settings.
The menu option "Save Settings" places a copy of the settings on the local hard drive, or floppy or usb stick.
Booting with "knoppix home=scan" will search for them..

jiante 07-27-2005 03:37 AM

after changing the interfaces file and restarting the com, i discovered i have to type not onli the pump command but also change back my essid and mode because it has been reset. Any idea why this has happened?

using the knoppix save settings doesn't help either.


All times are GMT -5. The time now is 06:31 AM.