Results 1 to 10 of 10
Greetings
I am working with a bare bones lenny that connects fine to an ADSL router using wireless ethernet and a fixed IP. I am trying to reconfigure to use ...
- 01-04-2010 #1
Configuring Lenny to use DHCP
Greetings
I am working with a bare bones lenny that connects fine to an ADSL router using wireless ethernet and a fixed IP. I am trying to reconfigure to use DHCP but it isn't happening.
I'm using the following page as a reference...
An introduction to Debian networking setup
ok I modified my /etc/network/interfaces file as follows...
# The primary network interface
allow-hotplug wlan0
iface wlan0 inet dhcp
dpkg --get-selections shows I have the following installed
dhcp3-client install
dhcp-common install
as I understand, that is all that is needed. However when I try to ping the router I get the error network unreachable. ifconfig does not have an inet addr. in the wlan0 section. dmesg | grep dhcp shows nothing at all.
not sure how to proceed from here.
- 01-04-2010 #2
Can you post your entire /etc/network/interfaces file?
You restarted the networking daemon afterwards, I assume?
Are you using any sort of encryption and have you accounted for that?
- 01-04-2010 #3
the only other lines in file interfaces, besides a couple of comments, are...
yes I did a restart of the daemon, and also rebooted the computer as a second try.Code:# The loopback network interface auto lo iface lo inet loopback
No encryption is being used, just a MAC filter on the linksys box.
I see there is a file called /etc/dhcp3/dhclient.conf. I looked in there and didn't see anything that looked like a binding to the wireless NIC. I suppose that might be an issue?
- 01-04-2010 #4Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
There is usually a startup script for the dhcp service under /etc/init.d. Is it there and is it started?
Using wireless on a command-line system will likely require some manual steps. The NIC has to make association with with the access point (iwconfig), and then the dhcp client has to run. When you have a GUI installed, these are usually managed by the network manager application.
Here is a comprehensive guide to wireless networking on Linux - Google: linux wireless command line
- 01-04-2010 #5
Hmm, it's been awhile since I've done networking the debian way.
I would try something like this:
The gateway and router address are probably the same. This is assuming your router is setting the DNS server, and you are not manual setting it in /etc/resolv.conf. The broadcast address also depends on your network.Code:# The loopback network interface auto lo iface lo inet loopback auto wlan0 iface wlan0 inet dhcp netmask 255.255.255.0 gateway <gateway address> dns-nameservers <router address> wireless-essid <network name>
I've never had to manually edit dhclient.conf for anything.
- 01-04-2010 #6
OK, i did not see anything obvious in etc/init.d/ that looked like a startup script for dhcp. but doing ps -ef | grep dhcp produced the following output, which I believe identifies the dhcp client as a running service...
Anyways, with regards to doing command line only, this really is just an exercise, to squeeze whatever I can out of the barebones install before I continue to build up the system. So it is probably not the easiest way to go.Code:root 1832 1 0 11:03 ? 00:00:00 dhclient3 -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp3/dhclient.wlan0.leases wlan0
when I was going through the install of my system, I was presented with the option of using dhcp, but this failed with a message unable to find wireless access point, so I just did a manual tcp/ip configuration following the installer prompts, using the same settings ( except for IP addr of course ) that my windows PC was assigned using wireless dhcp. I made sure to set aside a range of addresses on the router that would not be assigned via dhcp. Anyways, this static configuration worked fine, with full internet access, with no additional steps necessary after the install was completed.
reed9, I'd be a bit surprised to find I had to specify things like netmask and gateway, I thought dhcp was supposed to take care of all that automatically. Nonetheless, I'll give it a try later if I don't have any better options, and let you know how it goes.
Thanks.
- 01-04-2010 #7
You shouldn't have to, true, but worth a try, I guess.

The wireless essid may be helpful, though.
There's a curses based network config tool that sidux uses, written in perl, called ceni, that might be worth a try. I couldn't find a homepage for it, but it can be installed using the smxi scripts.
- 01-04-2010 #8Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Static or DHCP, at some point you associated the wireless NIC with an access point.
As noted in the link I posted previously:
Code:Debian / Ubuntu In Debian / Ubuntu systems configuration requires the addition of a valid wireless-essid parameter to the /etc/network/interfaces file. # # File: /etc/network/interfaces # # The primary network interface auto eth1 iface eth1 inet static address 192.168.1.100 netmask 255.255.255.0 wireless-essid homenet auto eth0 iface eth0 inet dhcp wireless-essid jamrock In this example interface eth1 uses an ESSID of homenet while interface eth0 uses an ESSID of jamrock.
- 01-04-2010 #9
OK HRO, I hadn't had time to check out that link, but I will for sure for the other stuff I try.
Anyways, problem solved. Here is what happened...
During install and afterwards, I never did specify a wireless ESSID, but in the interfaces file for wlan0 when it was configured for static IP, there was the following lines...
my mistake was that when configuring for DHCP, I didn't look to closely at that which I was deleting, and I stripped these lines out also. By adding them back into the wlan0 section of interfaces, DHCP works fine.Code:# wireless - blah blah blah wireless-mode managed wireless-essid any
A word about wireless in general. It is my understanding that ESSID is something different than wireless network name, which I believe is 'linksys' outof the box. Also I understand that ESSID is a security option, it is not absolute requirement for functionality. So I had assumed that my MAC filter was enough to prevent access to the router, but I suppose without ESSID there is increased possibility I might accidentally connect to the neighbor's wireless? ANyways, I can see I have some howmework to do on wireless security. Thanks for the help.
- 01-04-2010 #10Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
It is my understanding that ESSID is something different than wireless network name, which I believe is 'linksys' outof the box.
Service set identifier, or SSID, is a name that identifies a particular 802.11 wireless LAN.
Yes - or a malicious AP happy to intercept all of your traffic.I suppose without ESSID there is increased possibility I might accidentally connect to the neighbor's wireless?


Reply With Quote
