jayjr1105 Posted May 13, 2021 Posted May 13, 2021 Running Armbian on a Rock64 (RK3328) board and in turn running pihole for DNS. I cannot seem to be able to get rid of the secondary IP address that is pulling from DHCP. the main static address I set duing pihole setup is 10.4.5.2. Any way to remove the 10.4.5.98? ifconfig from terminal only shows the .98 address.
djurny Posted May 15, 2021 Posted May 15, 2021 Hi, How are you configuring your interfaces? ifup/ifdown or NetworkManager? How many NICs do you have on the system? Both are connected to the same network? Can you share output of: # show current dhcp clients pgrep -al dhclient # show network manager info sudo nmcli dev sh sudo nmcli con sh # show interface info sudo ifconfig -a # show ifup/ifdown config cat /etc/network/interfaces cat /etc/network/interfaces.d/* # show current listening adresses of dnsmasq sudo netstat -anp -Aip Groetjes,
arox Posted May 15, 2021 Posted May 15, 2021 You didn't say if pihole works or not. I do not think ifconfig is able to report complex configurations correctly. (That may or may not work). Anyway it is recommended in pihole tutorials to setup a static IP address. For example edit : /etc/dhcpcd.conf. # Example static IP configuration: interface eth0 static ip_address=10.4.5.2/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=10.4.5.1 #adresse IP du modem/routeur #static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1 Note that you need to be careful to specify the correct bitmask : 10.4.5.2/24 means a 24 bit netmask although your router may think otherwise.
tparys Posted May 15, 2021 Posted May 15, 2021 Though common, ifconfig was unmaintained for many years. The tool you want is ip, and is overall a much more capable. # Shows IP addresses for all devices ip addr show # Removes a particular address from a given device ip addr del 192.168.1.200/24 dev eth0 This doesn't really solve why DHCP is starting up and pulling a second address for you, but can help get rid of multiple addresses once you kill it.
Recommended Posts