Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Welcome to the site and thank you for your contribution. Please edit your answer to add some words on which OS flavor/version you are using. The reason is that yours seems to use SysV-Init, whereas in particular in the Linux world, systemd is currently the standard, and the service name and syntax to use are different there. Commented Apr 8, 2020 at 9:38
  • @AdminBee Nope, this answer works for me, though I have systemd as init and systemctl restart networking works too. Commented Jul 29, 2020 at 16:54
  • It is really weird, nslookup my.domain.tld returns the new IP address while ping my.domain.tld goes to the old one. Restarting the networking service fixes this. Commented Jul 29, 2020 at 16:58
  • @Arnie97 Yes, the answer may work because currently there is limited backwards-compatibility support for the init.d mechanism, but it is unlikely to survive long into the future. Commented Jul 30, 2020 at 8:12
  • 2
    @Arnie97 Some versions of nslookup will always bypass any local caches and will instead read /etc/resolv.conf and automatically contact the nameserver(s) found in there directly (unless the command line includes a specific nameserver to query). On the other hand, ping will always use the currently configured resolver, which may or may not include a caching feature. Commented Sep 23, 2021 at 6:44