0

I have an laptop running Ubuntu connected to my home network. My home network connects to the outside world through a NETGEAR CG3000 gateway that acts as a DHCP server.

My laptop normally uses a wired connection, and for practical reasons I have set up a fixed IP address reservation for my computer (192.168.1.11) in the router. This works fine, until I carry my laptop to another location in my home and connect to the router through a wireless connection (which gets another IP address). This often (but not always!) causes the router to delete the IP address reservation for my wired connection.

I presume that this is a bug in the router. My question is what can I do on my Ubuntu laptop to solve this?

I do not want to set up a fixed IP address in the laptop because I occasionally need to connect it to other networks where the address 192.168.1.11 may not be appropriate.

Is there any way I can configure my laptop to use a fixed IP address when on my home network and a DHCP-assigned address when on a foreign network?

Alternatively, is there any way I can make the laptop present a different hostname to the DHCP server, depending on whether I connect through the wired or the wireless interface? (I here assume that it is the occurrence of the hostname on a new MAC address that triggers the bug in the router.)

3
  • Have you tried upgrading your router's firmware?
    – LawrenceC
    Aug 8, 2013 at 20:09
  • I can't do that, ultrasawblade. The router belongs to my ISP, and they decide when they want to upgrade. I'm stuck with what I've got.
    – oz1cz
    Aug 8, 2013 at 20:27
  • I assume on Ubuntu you are using something like NetworkManager. I do know from years of server experience with Debian that you can stick scripts in /etc/network/ifup.d and such to do things when an interface is brought up and down, including finding out if you are on your home network and assigning an IP automatically. Not sure how those interact with NetworkManager but may be something to look into. Alternatively you could put another router behind your ISP's one or run your own DHCP server on another box in your network.
    – LawrenceC
    Aug 8, 2013 at 20:54

0

You must log in to answer this question.

Browse other questions tagged .