Cómo sobre host
?
El host
comando es muy similar a dig
, excepto que es mucho más sencillo y no tenemos la información técnica (si usted no lo necesita). Así, por ejemplo, host
de búsqueda sería algo como lo siguiente:
$ host apple.stackexchange.com
apple.stackexchange.com has address 151.101.129.69
apple.stackexchange.com has address 151.101.193.69
apple.stackexchange.com has address 151.101.65.69
apple.stackexchange.com has address 151.101.1.69
También puede especificar qué servidor DNS que desea utilizar agregando el comando:
$ host apple.stackexchange.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
apple.stackexchange.com has address 151.101.193.69
apple.stackexchange.com has address 151.101.129.69
apple.stackexchange.com has address 151.101.1.69
apple.stackexchange.com has address 151.101.65.69
Y si es absolutamente necesario, puede agregar -a
para obtener el mismo resultado como dig
comando:
$ host -a apple.stackexchange.com 8.8.8.8
Trying "apple.stackexchange.com"
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26262
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;apple.stackexchange.com. IN ANY
;; ANSWER SECTION:
apple.stackexchange.com. 299 IN A 151.101.129.69
apple.stackexchange.com. 299 IN A 151.101.65.69
apple.stackexchange.com. 299 IN A 151.101.193.69
apple.stackexchange.com. 299 IN A 151.101.1.69
Received 105 bytes from 8.8.8.8#53 in 39 ms