How to resolve the algorithm DNS query step by step in the UNIX Shell programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm DNS query step by step in the UNIX Shell programming language

Table of Contents

Problem Statement

DNS is an internet service that maps domain names, like rosettacode.org, to IP addresses, like 66.220.0.231. Use DNS to resolve www.kame.net to both IPv4 and IPv6 addresses. Print these addresses.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm DNS query step by step in the UNIX Shell programming language

Source code in the unix programming language

Aamrun ~ % dig www.kame.net A www.kame.net AAAA +short
mango.itojun.org.
210.155.141.200
mango.itojun.org.
2001:2f0:0:8800:226:2dff:fe0b:4311
2001:2f0:0:8800::1:1
Aamrun ~ %


Aamrun ~ % nslookup
> set q=AAAA
> www.kame.net
Server:		192.168.1.1
Address:	192.168.1.1#53

Non-authoritative answer:
www.kame.net	canonical name = mango.itojun.org.
mango.itojun.org	has AAAA address 2001:2f0:0:8800:226:2dff:fe0b:4311
mango.itojun.org	has AAAA address 2001:2f0:0:8800::1:1

Authoritative answers can be found from:
> set q=A
> www.kame.net
Server:		192.168.1.1
Address:	192.168.1.1#53

Non-authoritative answer:
www.kame.net	canonical name = mango.itojun.org.
Name:	mango.itojun.org
Address: 210.155.141.200
> exit

Aamrun ~ %


  

You may also check:How to resolve the algorithm Respond to an unknown method call step by step in the Python programming language
You may also check:How to resolve the algorithm User input/Text step by step in the J programming language
You may also check:How to resolve the algorithm Sort an integer array step by step in the Objeck programming language
You may also check:How to resolve the algorithm Floyd's triangle step by step in the AppleScript programming language
You may also check:How to resolve the algorithm Sorting algorithms/Selection sort step by step in the Haskell programming language