Dns Priority
Test suite to check DNS service priorities
Valid Address
Description
Configures a simple, valid address and checks the DNS can resolve it. There is no priority involved as a single address is in use.
Scenario
Step 1: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 10.0.0.2/24 set service dns forwarding record host teldat.com ipv4-address 172.24.0.11 set service dns forwarding record host teldat.com ipv6-address 'ff00::dead:cafe' set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.0.0.1/24 set service dns forwarding logs set service dns forwarding name-server 10.0.0.2 set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.0.0.2
from DUT0
:
admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.428 ms --- 10.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.428/0.428/0.428/0.000 ms
Step 4: Run command show host lookup teldat.com type A wait 0
at DUT0
and check if output contains the following tokens:
172.24.0.11
Show output
teldat.com has address 172.24.0.11
Step 5: Run command system journal show | cat
at DUT0
and expect this output:
Show output
May 13 16:30:18.305359 osdx systemd-journald[27261]: Runtime Journal (/run/log/journal/29acf74054db4c3a94b562797c4c13a9) is 2.1M, max 15.3M, 13.1M free. May 13 16:30:18.306040 osdx systemd-journald[27261]: Received client request to rotate journal, rotating. May 13 16:30:18.306081 osdx systemd-journald[27261]: Vacuuming done, freed 0B of archived journals from /run/log/journal/29acf74054db4c3a94b562797c4c13a9. May 13 16:30:18.314727 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system journal clear'. May 13 16:30:18.655156 osdx osdx-coredump[188246]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... May 13 16:30:18.663378 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system coredump delete all'. May 13 16:30:20.177600 osdx OSDxCLI[30995]: User 'admin' entered the configuration menu. May 13 16:30:20.259051 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.0.0.1/24'. May 13 16:30:20.328400 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding logs'. May 13 16:30:20.424577 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns resolver local'. May 13 16:30:20.523792 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding name-server 10.0.0.2'. May 13 16:30:20.616588 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'show working'. May 13 16:30:20.717067 osdx ubnt-cfgd[188266]: inactive May 13 16:30:20.738237 osdx INFO[188274]: FRR daemons did not change May 13 16:30:20.938397 osdx systemd[1]: Starting dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server... May 13 16:30:20.947114 osdx dnsmasq[188417]: started, version 2.90 cachesize 150 May 13 16:30:20.947125 osdx dnsmasq[188417]: DNS service limited to local subnets May 13 16:30:20.947131 osdx dnsmasq[188417]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile May 13 16:30:20.947137 osdx dnsmasq[188417]: warning: ignoring resolv-file flag because no-resolv is set May 13 16:30:20.947152 osdx dnsmasq[188417]: using nameserver 10.0.0.2#53 May 13 16:30:20.947185 osdx dnsmasq[188417]: read /etc/hosts - 1 names May 13 16:30:20.973809 osdx systemd[1]: Started dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server. May 13 16:30:20.974634 osdx cfgd[1470]: [30995]Completed change to active configuration May 13 16:30:20.986800 osdx OSDxCLI[30995]: User 'admin' committed the configuration. May 13 16:30:21.004899 osdx OSDxCLI[30995]: User 'admin' left the configuration menu. May 13 16:30:21.155598 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'ping 10.0.0.2 count 1 size 56 timeout 1'. May 13 16:30:21.262003 osdx dnsmasq[188417]: query[A] teldat.com from ::1 May 13 16:30:21.262103 osdx dnsmasq[188417]: forwarded teldat.com to 10.0.0.2 May 13 16:30:21.262478 osdx dnsmasq[188417]: reply teldat.com is 172.24.0.11 May 13 16:30:21.273983 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'show host lookup teldat.com type A wait 0'.
Valid Address IPv6
Description
Configures a simple, valid IPv6 address and checks the DNS can resolve it. There is no priority involved as a single address is in use.
Scenario
Step 1: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address '10::2/64' set service dns forwarding record host teldat.com ipv4-address 172.24.0.11 set service dns forwarding record host teldat.com ipv6-address 'ff00::dead:cafe' set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address '10::1/64' set service dns forwarding logs set service dns forwarding name-server '10::2' set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10::2
from DUT0
:
admin@DUT0$ ping 10::2 count 1 size 56 timeout 1Show output
PING 10::2(10::2) 56 data bytes 64 bytes from 10::2: icmp_seq=1 ttl=64 time=459 ms --- 10::2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 458.745/458.745/458.745/0.000 ms
Step 4: Run command show host lookup teldat.com type A wait 0
at DUT0
and check if output contains the following tokens:
172.24.0.11
Show output
teldat.com has address 172.24.0.11
Step 5: Run command system journal show | cat
at DUT0
and expect this output:
Show output
May 13 16:30:25.324457 osdx systemd-journald[27261]: Runtime Journal (/run/log/journal/29acf74054db4c3a94b562797c4c13a9) is 2.1M, max 15.3M, 13.1M free. May 13 16:30:25.328014 osdx systemd-journald[27261]: Received client request to rotate journal, rotating. May 13 16:30:25.328072 osdx systemd-journald[27261]: Vacuuming done, freed 0B of archived journals from /run/log/journal/29acf74054db4c3a94b562797c4c13a9. May 13 16:30:25.335448 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system journal clear'. May 13 16:30:25.642467 osdx osdx-coredump[188742]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... May 13 16:30:25.650317 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system coredump delete all'. May 13 16:30:27.192411 osdx OSDxCLI[30995]: User 'admin' entered the configuration menu. May 13 16:30:27.271379 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10::1/64'. May 13 16:30:27.356840 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding logs'. May 13 16:30:27.455976 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns resolver local'. May 13 16:30:27.515298 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding name-server 10::2'. May 13 16:30:27.641543 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'show working'. May 13 16:30:27.702533 osdx ubnt-cfgd[188762]: inactive May 13 16:30:27.723533 osdx INFO[188770]: FRR daemons did not change May 13 16:30:27.892315 osdx systemd[1]: Starting dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server... May 13 16:30:27.901925 osdx dnsmasq[188913]: started, version 2.90 cachesize 150 May 13 16:30:27.901938 osdx dnsmasq[188913]: DNS service limited to local subnets May 13 16:30:27.901950 osdx dnsmasq[188913]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile May 13 16:30:27.901959 osdx dnsmasq[188913]: warning: ignoring resolv-file flag because no-resolv is set May 13 16:30:27.901980 osdx dnsmasq[188913]: using nameserver 10::2#53 May 13 16:30:27.902027 osdx dnsmasq[188913]: read /etc/hosts - 1 names May 13 16:30:27.931879 osdx systemd[1]: Started dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server. May 13 16:30:27.932893 osdx cfgd[1470]: [30995]Completed change to active configuration May 13 16:30:27.943634 osdx OSDxCLI[30995]: User 'admin' committed the configuration. May 13 16:30:27.986947 osdx OSDxCLI[30995]: User 'admin' left the configuration menu. May 13 16:30:29.128638 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'ping 10::2 count 1 size 56 timeout 1'. May 13 16:30:30.166356 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'ping 10::2 count 1 size 56 timeout 1'. May 13 16:30:30.251920 osdx dnsmasq[188913]: query[A] teldat.com from ::1 May 13 16:30:30.252000 osdx dnsmasq[188913]: forwarded teldat.com to 10::2 May 13 16:30:30.252336 osdx dnsmasq[188913]: reply teldat.com is 172.24.0.11 May 13 16:30:30.254084 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'show host lookup teldat.com type A wait 0'.
Multiple Addresses
Description
Configures two DNS addresses: one invalid and the other valid. Checks that the resolution works against the second address, while the first one does not respond.
Scenario
Step 1: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 10.0.0.2/24 set service dns forwarding record host teldat.com ipv4-address 172.24.0.11 set service dns forwarding record host teldat.com ipv6-address 'ff00::dead:cafe' set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.0.0.1/24 set service dns forwarding logs set service dns forwarding name-server 10.0.0.10 priority 0 set service dns forwarding name-server 10.0.0.2 priority 1 set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.0.0.2
from DUT0
:
admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.268 ms --- 10.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.268/0.268/0.268/0.000 ms
Step 4: Run command show host lookup teldat.com type A wait 0
at DUT0
and check if output contains the following tokens:
172.24.0.11
Show output
;; communications error to ::1#53: timed out ;; communications error to ::1#53: timed out teldat.com has address 172.24.0.11
Step 5: Run command system journal show | cat
at DUT0
and expect this output:
Show output
May 13 16:30:35.319452 osdx systemd-journald[27261]: Runtime Journal (/run/log/journal/29acf74054db4c3a94b562797c4c13a9) is 2.0M, max 15.3M, 13.3M free. May 13 16:30:35.321079 osdx systemd-journald[27261]: Received client request to rotate journal, rotating. May 13 16:30:35.321130 osdx systemd-journald[27261]: Vacuuming done, freed 0B of archived journals from /run/log/journal/29acf74054db4c3a94b562797c4c13a9. May 13 16:30:35.330433 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system journal clear'. May 13 16:30:35.666453 osdx osdx-coredump[189241]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... May 13 16:30:35.674337 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system coredump delete all'. May 13 16:30:37.089106 osdx OSDxCLI[30995]: User 'admin' entered the configuration menu. May 13 16:30:37.169517 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.0.0.1/24'. May 13 16:30:37.250110 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding logs'. May 13 16:30:37.312620 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns resolver local'. May 13 16:30:37.415329 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding name-server 10.0.0.10 priority 0'. May 13 16:30:37.470719 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding name-server 10.0.0.2 priority 1'. May 13 16:30:37.587081 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'show working'. May 13 16:30:37.649462 osdx ubnt-cfgd[189264]: inactive May 13 16:30:37.671516 osdx INFO[189272]: FRR daemons did not change May 13 16:30:37.857395 osdx systemd[1]: Starting dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server... May 13 16:30:37.865728 osdx dnsmasq[189415]: started, version 2.90 cachesize 150 May 13 16:30:37.865914 osdx dnsmasq[189415]: DNS service limited to local subnets May 13 16:30:37.865950 osdx dnsmasq[189415]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile May 13 16:30:37.865984 osdx dnsmasq[189415]: warning: ignoring resolv-file flag because no-resolv is set May 13 16:30:37.866025 osdx dnsmasq[189415]: using nameserver 10.0.0.10#53 May 13 16:30:37.866055 osdx dnsmasq[189415]: using nameserver 10.0.0.2#53 May 13 16:30:37.866110 osdx dnsmasq[189415]: read /etc/hosts - 1 names May 13 16:30:37.896403 osdx systemd[1]: Started dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server. May 13 16:30:37.897346 osdx cfgd[1470]: [30995]Completed change to active configuration May 13 16:30:37.908233 osdx OSDxCLI[30995]: User 'admin' committed the configuration. May 13 16:30:37.925845 osdx OSDxCLI[30995]: User 'admin' left the configuration menu. May 13 16:30:38.071941 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'ping 10.0.0.2 count 1 size 56 timeout 1'. May 13 16:30:38.146613 osdx dnsmasq[189415]: query[A] teldat.com from ::1 May 13 16:30:38.146677 osdx dnsmasq[189415]: forwarded teldat.com to 10.0.0.10 May 13 16:30:39.148332 osdx dnsmasq[189415]: query[A] teldat.com from ::1 May 13 16:30:40.148718 osdx dnsmasq[189415]: query[A] teldat.com from 127.0.0.1 May 13 16:30:40.148762 osdx dnsmasq[189415]: forwarded teldat.com to 10.0.0.2 May 13 16:30:40.149094 osdx dnsmasq[189415]: reply teldat.com is 172.24.0.11 May 13 16:30:40.151009 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'show host lookup teldat.com type A wait 0'.
Multiple IPv6 Addresses
Description
Configures two IPv6 DNS addresses: one invalid and the other valid. Checks that the resolution works against the second address, while the first one does not respond.
Scenario
Step 1: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address '10::2/64' set service dns forwarding record host teldat.com ipv4-address 172.24.0.11 set service dns forwarding record host teldat.com ipv6-address 'ff00::dead:cafe' set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address '10::1/64' set service dns forwarding logs set service dns forwarding name-server '10::10' priority 0 set service dns forwarding name-server '10::2' priority 1 set service dns resolver local set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10::2
from DUT0
:
admin@DUT0$ ping 10::2 count 1 size 56 timeout 1Show output
PING 10::2(10::2) 56 data bytes 64 bytes from 10::2: icmp_seq=1 ttl=64 time=0.282 ms --- 10::2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.282/0.282/0.282/0.000 ms
Step 4: Run command show host lookup teldat.com type A wait 0
at DUT0
and check if output contains the following tokens:
172.24.0.11
Show output
;; communications error to ::1#53: timed out ;; communications error to ::1#53: timed out teldat.com has address 172.24.0.11
Step 5: Run command system journal show | cat
at DUT0
and expect this output:
Show output
May 13 16:30:44.292213 osdx systemd-journald[27261]: Runtime Journal (/run/log/journal/29acf74054db4c3a94b562797c4c13a9) is 2.0M, max 15.3M, 13.3M free. May 13 16:30:44.293856 osdx systemd-journald[27261]: Received client request to rotate journal, rotating. May 13 16:30:44.293917 osdx systemd-journald[27261]: Vacuuming done, freed 0B of archived journals from /run/log/journal/29acf74054db4c3a94b562797c4c13a9. May 13 16:30:44.302984 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system journal clear'. May 13 16:30:44.684838 osdx osdx-coredump[189740]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... May 13 16:30:44.692892 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'system coredump delete all'. May 13 16:30:46.265830 osdx OSDxCLI[30995]: User 'admin' entered the configuration menu. May 13 16:30:46.396912 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10::1/64'. May 13 16:30:46.459407 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding logs'. May 13 16:30:46.569247 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns resolver local'. May 13 16:30:46.690421 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding name-server 10::10 priority 0'. May 13 16:30:46.791576 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'set service dns forwarding name-server 10::2 priority 1'. May 13 16:30:46.861008 osdx OSDxCLI[30995]: User 'admin' added a new cfg line: 'show working'. May 13 16:30:46.959628 osdx ubnt-cfgd[189761]: inactive May 13 16:30:46.980650 osdx INFO[189769]: FRR daemons did not change May 13 16:30:47.174153 osdx systemd[1]: Starting dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server... May 13 16:30:47.181853 osdx dnsmasq[189912]: started, version 2.90 cachesize 150 May 13 16:30:47.181864 osdx dnsmasq[189912]: DNS service limited to local subnets May 13 16:30:47.181870 osdx dnsmasq[189912]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile May 13 16:30:47.181878 osdx dnsmasq[189912]: warning: ignoring resolv-file flag because no-resolv is set May 13 16:30:47.181896 osdx dnsmasq[189912]: using nameserver 10::10#53 May 13 16:30:47.181903 osdx dnsmasq[189912]: using nameserver 10::2#53 May 13 16:30:47.181947 osdx dnsmasq[189912]: read /etc/hosts - 1 names May 13 16:30:47.207970 osdx systemd[1]: Started dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server. May 13 16:30:47.209304 osdx cfgd[1470]: [30995]Completed change to active configuration May 13 16:30:47.220220 osdx OSDxCLI[30995]: User 'admin' committed the configuration. May 13 16:30:47.237781 osdx OSDxCLI[30995]: User 'admin' left the configuration menu. May 13 16:30:48.379422 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'ping 10::2 count 1 size 56 timeout 1'. May 13 16:30:48.955476 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'ping 10::2 count 1 size 56 timeout 1'. May 13 16:30:49.068270 osdx dnsmasq[189912]: query[A] teldat.com from ::1 May 13 16:30:49.068353 osdx dnsmasq[189912]: forwarded teldat.com to 10::10 May 13 16:30:50.069671 osdx dnsmasq[189912]: query[A] teldat.com from ::1 May 13 16:30:51.070454 osdx dnsmasq[189912]: query[A] teldat.com from 127.0.0.1 May 13 16:30:51.070487 osdx dnsmasq[189912]: forwarded teldat.com to 10::2 May 13 16:30:51.070786 osdx dnsmasq[189912]: reply teldat.com is 172.24.0.11 May 13 16:30:51.072784 osdx OSDxCLI[30995]: User 'admin' executed a new command: 'show host lookup teldat.com type A wait 0'.