Skip to content

Commit a7791da

Browse files
authored
Merge pull request #78594 from slovern/OCPBUGS-34715
OCPBUGS-34715 - troubleshooting DNS in disconnected environment
2 parents 60a09cb + 712cfcd commit a7791da

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="troubleshooting-dns-disconnected-env-dnsmasq_{context}"]
7+
= Configuring the dnsmasq DNS server
8+
9+
If you are using `dnsmasq` as the DNS server, you can delegate resolution of the `root-servers.net` domain to another DNS server, for example, by creating a new configuration file that resolves `root-servers.net` using a DNS server that you specify.
10+
11+
. Create a configuration file that delegates the domain `root-servers.net` to another DNS server by running the following command:
12+
+
13+
[source,terminal]
14+
----
15+
$ echo 'server=/root-servers.net/<DNS_server_IP>'> /etc/dnsmasq.d/delegate-root-servers.net.conf
16+
----
17+
18+
. Restart the `dnsmasq` service by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ systemctl restart dnsmasq
23+
----
24+
25+
. Confirm that the `root-servers.net` domain is delegated to another DNS server by running the following command:
26+
+
27+
[source,terminal]
28+
----
29+
$ journalctl -u dnsmasq|grep root-servers.net
30+
----
31+
+
32+
.Example output
33+
+
34+
[source,terminal]
35+
----
36+
Jul 03 15:31:25 rhel-8-10 dnsmasq[1342]: using nameserver 192.168.1.1#53 for domain root-servers.net
37+
----
38+
39+
. Verify that the DNS server can resolve the NS record for the `root-servers.net` domain by running the following command:
40+
+
41+
[source,terminal]
42+
----
43+
$ host -t NS root-servers.net. 127.0.0.1
44+
----
45+
+
46+
.Example output
47+
+
48+
[source,terminal]
49+
----
50+
Using domain server:
51+
Name: 127.0.0.1
52+
Address: 127.0.0.1#53
53+
Aliases:
54+
root-servers.net name server root-servers.net.
55+
----
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="troubleshooting-dns-disconnected-env_{context}"]
7+
= Troubleshooting DNS connectivity issues in a disconnected environment
8+
9+
If you experience DNS connectivity issues when configuring `nmstate` in a disconnected environment, you can configure the DNS server to resolve the list of name servers for the domain `root-servers.net`.
10+
11+
== Configuring the bind9 DNS named server
12+
13+
For a cluster configured to query a `bind9` DNS server, you can add the `root-servers.net` zone to a configuration file that contains at least one NS record.
14+
For example you can use the `/var/named/named.localhost` as a zone file that already matches this criteria.
15+
16+
.Procedure
17+
18+
. Add the `root-servers.net` zone at the end of the `/etc/named.conf` configuration file by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ cat >> /etc/named.conf <<EOF
23+
zone "root-servers.net" IN {
24+
type master;
25+
file "named.localhost";
26+
};
27+
EOF
28+
----
29+
30+
. Restart the `named` service by running the following command:
31+
+
32+
[source,terminal]
33+
----
34+
$ systemctl restart named
35+
----
36+
37+
. Confirm that the `root-servers.net` zone is present by running the following command:
38+
+
39+
[source,terminal]
40+
----
41+
$ journalctl -u named|grep root-servers.net
42+
----
43+
+
44+
.Example output
45+
[source,terminal]
46+
----
47+
Jul 03 15:16:26 rhel-8-10 bash[xxxx]: zone root-servers.net/IN: loaded serial 0
48+
Jul 03 15:16:26 rhel-8-10 named[xxxx]: zone root-servers.net/IN: loaded serial 0
49+
----
50+
51+
. Verify that the DNS server can resolve the NS record for the `root-servers.net` domain by running the following command:
52+
+
53+
[source,terminal]
54+
----
55+
$ host -t NS root-servers.net. 127.0.0.1
56+
----
57+
+
58+
.Example output
59+
+
60+
[source,terminal]
61+
----
62+
Using domain server:
63+
Name: 127.0.0.1
64+
Address: 127.0.0.53
65+
Aliases:
66+
root-servers.net name server root-servers.net.
67+
----

networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ This includes issues such as:
1515
* The host loses connection to the API server.
1616
1717
include::modules/virt-troubleshooting-incorrect-policy-config.adoc[leveloffset=+1]
18+
19+
include::modules/k8s-nmstate-troubleshooting-dns-disconnected-env.adoc[leveloffset=+1]
20+
21+
include::modules/k8s-nmstate-troubleshooting-dns-disconnected-env-dnsmasq.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)