How to explicitly drop dynamic network connection in favor of static one?

Neil Cherry ncherry at
Thu May 24 16:18:29 UTC 2007

Danny Colligan wrote:
> I am running a FTP server that is capable of grabbing both a dynamic
> and static IP address.  Because of various circumstances regarding the
> building's networking, I wanted to switch from the DHCP-given address
> to a static one.  Therefore, I changed the entries in
> /etc/networks/interfaces to reflect the static values and did a sudo
> /etc/init.d/networking restart.  This, however, did not make the
> server drop the dynamic connection.  I eventually accomplished this by
> the Windows universal solution (i.e. a reboot) and then the server
> used the static address.
> My question is, what would be the "right way" to do this?  That is,
> explicitly drop the DHCP connection in favor of the static one without
> rebooting?

Any idea what the command 'ifconfig' returned? You can edit at
the command line (as root or using sudo) the interface of interest
with ifconfig. You'll probably need to kill the dhcp client daemon
so that it doesn't attempt to get another address. I don't do
menus so I don't know if this is the right way.

Linux Home Automation         Neil Cherry       ncherry at                         Main site                    My HA Blog
Author of:    	Linux Smart Homes For Dummies

More information about the ubuntu-users mailing list