1

I'm using Debian and I have trouble assigning a static IP to my computer to my local wireless network. I've setup my configuration files in my computer correctly but that does not seem to work.

Does this have to do with the DHCP server of my access point?

From the router configuration I can see that the access point has leased my current IP for an amount of time.

Should I configure my access point to also assign the ip that my computer is configured to use?

2 Answers 2

1

From the router configuration I can see that the access point has leased my current IP for an amount of time.

This is he rub. The static IP you choose should lie outside the range of IPs assigned by the router. There are only a handful of routers which use the whole subnet range, i.e. 192.168.1.2-192.168.1.254. Even in this case, you may restrict the range of assigned IPs, and then choose one in the remaining range for your static configuration.

The fact that the router has leased your chosen address is by itself reason to suspect that your current configuration will not work.

Should it not work still after you have done what I suggested above, ask yourself: do I have a router configured? Do I have a DNS server configured? Since you have refused a DHCP connection, you will have to provide these yourself:

   ip route add default via 192.168.1.1 dev eth0
   echo nameserver 8.8.8.8 >> /etc/resolv.conf
   echo nameserver 8.8.4.4 >> /etc/resolv..conf

to set them (this assumes you are connected via interface eth0 and your gateway has IP address 192.168.1.1, and I have chosen for you Google DNSes), and to check

   ip route show
   cat /etc/resolv.conf

If you want to do this from /etc/network/interfaces, you may adapt the following to your needs:

   auto eth0
   iface eth0 inet static
    address 192.168.73.96
    netmask 255.255.255.0
    gateway 192.168.73.129
    post-up echo "domain mylan.lan" >> /etc/resolv.conf
    post-up echo "search mylan.lan myotherlan.lan" >> /etc/resolv.con
    post-up echo nameserver 8.8.8.8 >> /etc/resolv.conf
    post-up echo nameserver 8.8.4.4 >> /etc/resolv.conf
0

It is enough to configure the fixed IP in your access point and leave your computer to automatic configuration via DHCP (that is how I have my home network set up).

That way, you don't need to worry about the computer's configuration at all and the DHCP server can make sure that that IP is not leased to another machine.

Most access points support assigning a fixed IP address to a specific MAC address.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .