0

I run networkmanager together with cockpit on Debian Buster. I have one physical interface and three VLANs on top of it. All of them are configured to have static IPs (ipv4.method: manual). However, on top of the configured static IP (without gateway I must say), the interface ALWAYS receives an additional IP via DHCP. How can I prevent this from happening?

UPDATE

I followed the advice of not using network manager but I still receive a DHCP address on top of my statically configured IP. My config is like this:

#/etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug ens192
iface ens192 inet static
  address 10.29.10.253/24
  gateway 10.29.10.254

auto ens192.21
iface ens192.21 inet static
  address 10.29.21.253/24

And the result looks like this

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0c:29:92:0a:db brd ff:ff:ff:ff:ff:ff
    inet 10.29.10.253/24 brd 10.29.10.255 scope global ens192
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe92:adb/64 scope link 
       valid_lft forever preferred_lft forever
3: ens192.21@ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:0c:29:92:0a:db brd ff:ff:ff:ff:ff:ff
    inet 10.29.21.253/24 brd 10.29.21.255 scope global ens192.21
       valid_lft forever preferred_lft forever
    inet 10.29.21.127/24 brd 10.29.21.255 scope global secondary noprefixroute ens192.21
       valid_lft forever preferred_lft forever
    inet6 fe80::78c0:87f0:55e:3191/64 scope link 
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe92:adb/64 scope link 
       valid_lft forever preferred_lft forever
# ip route
ip route
default via 10.29.10.254 dev ens192 src 10.29.10.253 metric 202 
default via 10.29.21.254 dev ens192.21 proto dhcp src 10.29.21.127 metric 203 
10.29.10.0/24 dev ens192 proto dhcp scope link src 10.29.10.253 metric 202 
10.29.21.0/24 dev ens192.21 proto dhcp scope link src 10.29.21.127 metric 203
0

I am not familiar wirh cockpit (probably something similar to webmin). In most cases the NetworkManager is not recomended for server, it is more suitable for workstation with GUI. So the primary advice is to uninstall NetworkManager. But in that case you have to install the ifupdown package, to be able to configure the interfaces.

If NetworkManager in use, you may configure it to ignore an interface as described here .

| improve this answer | |
  • I've found systemd-networkd very easy to use for setting up interfaces. – Jan Dorniak Apr 5 at 20:40
  • I followed your advice but to no avail. I updated my question with the result/issue. – TylerDurden Apr 6 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.