LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unwanted DHCP configuration in Debian squeeze (https://www.linuxquestions.org/questions/linux-networking-3/unwanted-dhcp-configuration-in-debian-squeeze-4175460470/)

odin_ago 05-02-2013 02:41 PM

Unwanted DHCP configuration in Debian squeeze
 
I am using debian squeeze, and I want to have a static ip configuration on the computer in question. Here is my /etc/network/interfaces :
Code:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.2.10
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.1
dns-nameservers 192.168.1.1

I have a DHCP server in this network, but I don't want to use it for this computer. However, sometimes I see that the ip address was altered to something offered by the DHCP server. How can I keep my ip address really static?

Kustom42 05-02-2013 06:45 PM

Add the following directive to your interfaces:

Set managed=false in /etc/NetworkManager/NetworkManager.conf.

Restart NetworkManager:

/etc/init.d/network-manager restart


More than likely network manager is trying to think for you.

That "auto eth0" tells NM to automatically configure the interface, even tho its the proper syntax for a static Ip to open wit the auto followed by the static iface line.

odin_ago 05-02-2013 08:26 PM

I have never installed NetworkManager on this computer (at least explicitly), and I don't have files /etc/NetworkManager/NetworkManager.conf and /etc/init.d/network-manager .

Kustom42 05-02-2013 08:43 PM

Well that would be too easy...

There would have to be some other piece of software interfering or some other system config that is playing a part here. From the info you given us your IP should only be assigned to that static IP.

Have you noticed if the tx/rx packets reset when the IP changes for the interface?

odin_ago 05-02-2013 08:51 PM

No, RX and TX are not dropped both when I figure out that my ip address was changed by dhcp and when I return it back using
Code:

/etc/init.d/networking stop
/etc/init.d/networking start



All times are GMT -5. The time now is 03:04 AM.