I have a Linux server (Rasperry Pi using Raspbian as OS) that should be using only static IP.
However I noticed that it also has got IP from DHCP server (The IP given out by DHCP is
192.168.111.2). According to network settings the server should be only using static IP (
The contents of
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.111.100 netmask 255.255.255.0 gateway 192.168.111.1 dns-nameservers ip1 ip2
Despite using static configuration I can SSH to the device also using the IP given by DHCP. Also it appears that
ntpd is using the wrong IP as well as the correct one.
Output of Netstat:
udp 0 0 192.168.111.2:123 0.0.0.0:* 2774/ntpd udp 0 0 192.168.111.100:123 0.0.0.0:* 2774/ntpd
ifconfig the IP
192.168.111.2 is not used:
eth0 Link encap:Ethernet HWaddr b8:27:eb:be:18:1c inet addr:192.168.111.100 Bcast:192.168.111.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:138099 errors:0 dropped:0 overruns:0 frame:0 TX packets:81146 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:95954711 (91.5 MiB) TX bytes:27076870 (25.8 MiB)
ps -ef | grep dhcp shows that I have a DHCP daemon running:
root 2000 1 0 Oct07 ? 00:00:06 /sbin/dhcpcd
How do I disable the
DHCP daemon from starting and make sure that my server uses only the static?