Need to change DNS server that API gateway is pointing to
search cancel

Need to change DNS server that API gateway is pointing to

book

Article ID: 227676

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

A widely used API is failing intermittently due to the hostname resolution. There is a requirement to update the DNS server to point to a different address.

After making the DNS server change in the /etc/resolv.conf and rebooting the gateway nodes, the IP address is reverting back to the old DNS server.

Environment

All supported versions of the CA API Gateway

Cause

DNS settings involve two files: /etc/resolv.conf and /etc/dhcp/dhclient.conf.

In the /etc/dhcp/dhclient.conf, there is a supersede statement that still had the old DNS server IP address.

Resolution

For each node, update the DNS server IP address in the /etc/resolv.conf and /etc/dhcp/dhclient.conf

(1) Make a backup copy: cp /etc/dhcp/dhclient.conf /etc/dhcp/dhclient.conf.bkup
(2) Edit the file and update the IP address: vi /etc/dhcp/dhclient.conf
(3) Save the file: wq!
(4) Make a backup copy: cp /etc/resolv.conf /etc/resolv.conf.bkup
(5) Edit the file and update the IP address: vi /etc/resolv.conf
(6) Save the file: wq!
(7) Reboot the node
(8) Confirm the IP address change has stayed: cat /etc/resolv.conf, cat /etc/dhcp/dhclient.conf