I'm configuring a new Debian 11 server running on a private network. It is determinedly taking a DHCP address in addition to the static IP I am manually configuring. I don't understand where it gets the DHCP address and how I can turn that off.
Out of the box it grabs a DHCP address (I guess it has an auto-configure for the network?); since I want it running on a manually assigned static IP, I modified /etc/network/interfaces to configure the static IP (in addition to the lo lines):
auto enp0s25
allow-hotplug enp0s25
iface enp0s25 inet static
address 10.0.0.16/24
gateway 10.0.0.1
dns-nameservers 10.0.0.1
and I am rewarded for my effort by having two IPs configured for this device
user@server:~$ ip a
1: lo: ...
2: enp0s25: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether d0:50:99:5a:08:98 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.16/24 brd 10.0.0.255 scope global enp0s25
valid_lft forever preferred_lft forever
inet 10.0.0.190/24 brd 10.0.0.255 scope global secondary enp0s25
valid_lft forever preferred_lft forever
inet6 fe80::d250:99ff:fe5a:898/64 scope link
valid_lft forever preferred_lft forever
(note this configuration is stably reproducible on reboot)
As I understand it there should be three ways of configuring the network:
- networking - I'm using that, because that's what I'm most used to
- NetworkManager - it's not installed, and the service isn't running
- systemd - systemd-networkd claims to be disabled
So what other config(s) am I not finding? And how do I make sense of this mess?
There are other screwy things about the networking (ifdown/ifup not working properly, restarting networking throwing errors), but I'm guessing/hoping its related to unclear control of the interface.
EDIT: This is the syslog output relevant to enp0s25:
Dec 16 19:37:57 angelo systemd[1]: Started ifup for enp0s25.
Dec 16 19:37:57 angelo kernel: [ 1.222564] e1000e 0000:00:19.0 enp0s25: renamed from eth0
Dec 16 19:37:57 angelo kernel: [ 2.613911] e1000e 0000:00:19.0 enp0s25: NIC Link is Down
Dec 16 19:37:57 angelo sh[413]: ifup: failed to bring up enp0s25
Dec 16 19:37:57 angelo systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Dec 16 19:37:57 angelo systemd[1]: [email protected]: Failed with result 'exit-code'.
Dec 16 19:37:57 angelo connmand[467]: enp0s25 {create} index 2 type 1 <ETHER>
Dec 16 19:37:57 angelo connmand[467]: enp0s25 {update} flags 36866 <DOWN>
Dec 16 19:37:57 angelo connmand[467]: enp0s25 {newlink} index 2 address D0:50:99:5A:08:98 mtu 1500
Dec 16 19:37:57 angelo connmand[467]: enp0s25 {newlink} index 2 operstate 2 <DOWN>
Dec 16 19:37:57 angelo connmand[467]: Adding interface enp0s25 [ ethernet ]
Dec 16 19:37:57 angelo connmand[467]: enp0s25 {update} flags 36867 <UP>
Dec 16 19:37:57 angelo connmand[467]: enp0s25 {newlink} index 2 address D0:50:99:5A:08:98 mtu 1500
Dec 16 19:37:57 angelo connmand[467]: enp0s25 {newlink} index 2 operstate 2 <DOWN>
Dec 16 19:37:58 angelo avahi-daemon[464]: Joining mDNS multicast group on interface enp0s25.IPv4 with address 10.0.0.16.
Dec 16 19:37:58 angelo connmand[467]: enp0s25 {add} address 10.0.0.16/24 label enp0s25 family 2
Dec 16 19:37:58 angelo avahi-daemon[464]: New relevant interface enp0s25.IPv4 for mDNS.
Dec 16 19:37:58 angelo connmand[467]: enp0s25 {add} route 10.0.0.0 gw 0.0.0.0 scope 253 <LINK>
Dec 16 19:37:58 angelo avahi-daemon[464]: Registering new address record for 10.0.0.16 on enp0s25.IPv4.
Dec 16 19:37:58 angelo connmand[467]: enp0s25 {add} route 0.0.0.0 gw 10.0.0.1 scope 0 <UNIVERSE>
Dec 16 19:38:00 angelo connmand[467]: enp0s25 {add} route fe80:: gw :: scope 0 <UNIVERSE>
Dec 16 19:38:00 angelo connmand[467]: enp0s25 {update} flags 102467 <UP,RUNNING,LOWER_UP>
Dec 16 19:38:00 angelo connmand[467]: enp0s25 {newlink} index 2 address D0:50:99:5A:08:98 mtu 1500
Dec 16 19:38:00 angelo connmand[467]: enp0s25 {newlink} index 2 operstate 6 <UP>
Dec 16 19:38:00 angelo kernel: [ 5.902126] e1000e 0000:00:19.0 enp0s25: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
Dec 16 19:38:00 angelo kernel: [ 5.902187] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s25: link becomes ready
Dec 16 19:38:01 angelo avahi-daemon[464]: Joining mDNS multicast group on interface enp0s25.IPv6 with address fe80::d250:99ff:fe5a:898.
Dec 16 19:38:01 angelo avahi-daemon[464]: New relevant interface enp0s25.IPv6 for mDNS.
Dec 16 19:38:01 angelo avahi-daemon[464]: Registering new address record for fe80::d250:99ff:fe5a:898 on enp0s25.*.
Dec 16 19:38:05 angelo avahi-daemon[464]: Registering new address record for 10.0.0.190 on enp0s25.IPv4.
Dec 16 19:38:05 angelo connmand[467]: enp0s25 {add} address 10.0.0.190/24 label enp0s25 family 2
Dec 16 19:38:05 angelo connmand[467]: enp0s25 {add} route 10.0.0.1 gw 0.0.0.0 scope 253 <LINK>
Dec 16 19:38:05 angelo connmand[467]: enp0s25 {add} route 82.165.8.211 gw 10.0.0.1 scope 0 <UNIVERSE>
Dec 16 19:38:09 angelo connmand[467]: enp0s25 {del} route 82.165.8.211 gw 10.0.0.1 scope 0 <UNIVERSE>
Dec 16 19:38:42 angelo connmand[467]: enp0s25 {del} route 0.0.0.0 gw 10.0.0.1 scope 0 <UNIVERSE>