[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian 9, dhclient does not update gateway



Old gateway host broke down, so I made a new one. One host now does get from DHCP server the new gateway IP -address, but continues to use the old. I can fix it temporarily doing

dhclient -r ; dhclient

but after boot it again uses the old gateway address. Another host also running Debian 9 behaves correctly.

root@viima:/etc/dhcp# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch

This is tail from /var/lib/dhcp/dhclient.leases
lease {
  interface "eth0";
  fixed-address 192.168.250.41;
  option subnet-mask 255.255.255.0;
  option routers 192.168.250.6;
  option dhcp-lease-time 3600;
  option dhcp-message-type 5;
  option domain-name-servers 192.168.250.2,192.168.250.10;
  option dhcp-server-identifier 192.168.250.2;
  option domain-name "office.mydomain.fi";
  renew 2 2021/01/05 14:26:38;
  rebind 2 2021/01/05 14:52:52;
  expire 2 2021/01/05 15:00:22;
}
root@viima:/etc/dhcp# ip r
default via 192.168.250.5 dev eth0 proto static metric 100
192.168.250.0/24 dev eth0 proto kernel scope link src 192.168.250.41 metric 100
root@viima:/etc/dhcp# 

root@viima:/etc/dhcp# systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-01-06 15:12:54 EET; 22min ago
     Docs: man:NetworkManager(8)
 Main PID: 549 (NetworkManager)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           ├─549 /usr/sbin/NetworkManager --no-daemon
           └─688 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/

tammi 06 15:13:00 viima NetworkManager[549]: <info>  [1609938780.1464] dhcp4 (eth0): state changed unknown -> bound
tammi 06 15:13:00 viima dhclient[688]: bound to 192.168.250.41 -- renewal in 1557 seconds.
tammi 06 15:13:00 viima NetworkManager[549]: <info>  [1609938780.9486] device (eth0): state change: ip-config -> ip-check (reason 'none') [7
tammi 06 15:13:00 viima NetworkManager[549]: <info>  [1609938780.9497] device (eth0): state change: ip-check -> secondaries (reason 'none')
tammi 06 15:13:00 viima NetworkManager[549]: <info>  [1609938780.9500] device (eth0): state change: secondaries -> activated (reason 'none')
tammi 06 15:13:00 viima NetworkManager[549]: <info>  [1609938780.9502] manager: NetworkManager state is now CONNECTED_LOCAL
tammi 06 15:13:01 viima NetworkManager[549]: <info>  [1609938781.1269] manager: NetworkManager state is now CONNECTED_GLOBAL
tammi 06 15:13:01 viima NetworkManager[549]: <info>  [1609938781.1270] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing a
tammi 06 15:13:01 viima NetworkManager[549]: <info>  [1609938781.1290] device (eth0): Activation: successful, device activated.
tammi 06 15:13:05 viima NetworkManager[549]: <info>  [1609938785.0519] manager: startup complete

How can I get that problem host to behave?

Reply to: