Comment utiliser la commande NSLookup

Vous tes ici : Accueil > Tutoriaux

Publi le : 02/06/2011 vers 19h
Mise jour le : 02/07/2008 vers 16h
Catgories :
  • Windows
  • Windows Server

Auteur(s) :
Sada AZIRI (Membre depuis le 12/02/2007)
Socit : Microsoft
Fonction : Consultant
Contactez cet auteur - Affichez les ressources de cet auteur

NSLookup (Name Server Lookup) est une commande qui permet de tester la résolution des noms d'hôtes en adresses IP et inversement. Elle permet un rapide diagnostique des problèmes de résolution DNS.

Lorsque vous tapez nslookup dans une invite de commande, le nom d'hôte et l'adresse IP du serveur DNS sont affichées par défaut .


Lorsque l’on saisie un nom d'hôte ou un FQDN, une adresse IP est renvoyée.


De même si vous saisissez une adresse IP, nslookup renvoie le FQDN.

De plus Nslookup indique si la réponse fait autorité ou non sur le domaine.

Une réponse faisant autorité  (authoritative answer) signifie qu'une zone dns (donc un fichier sur le serveur DNS auquel on est connecté) contient le domaine sur lequel on effectue la  requête et qu'il n'y a donc pas besoin de récupérer l'information auprès d'une autorité racine ou de transférer la requête à un redirecteur.

Une réponse ne fait pas autorité ( Non-authoritative answer)  signifie que que l’information à été récupérée depuis un serveur DNS qui ne fait pas autorité sur la zone.

Dans cet exemple, nslookup fournit le nom et les adresses IP des serveurs de

Par défaut la commande nslookup interroge le serveur DNS sur les enregistrements de type A (mappage entre un nom d'hôte et une adresse IPv4). Il est possible d’interroger le serveur DNS sur divers enregistrement en  utilisant la commande Set type = xx (remplacer xx par l’un des types suivants : MX, NS, A, SOA, CNAME, hinfo, any).

Une fois qu’on change le type de requête, les enregistrements retournés restent sur le type spécifié. Pour revenir sur les enregistrements de type A, tapez : Set-type = A ou fermer la fenêtre nslookup.

1.1 Set-type = MX

Recueillir des informations sur les enregistrements MX (serveurs de messagerie) :

> set type=MX

  • Les deux premières lignes indique le nom et l’adresse IP du serveur DNS local.
  • Les cinq lignes suivantes montrent que le domaine à 5 enregistrements MX. Les enregistrements MX possèdent une priorité, également appelé coût. Les mails sont envoyés au serveur ayant le coût le plus faible (5). S’il n’est pas joignable, les mails sont envoyés aux serveurs avec le coût juste au dessus (10).De même s’ils ne sont pas joignables, les serveurs avec un coût de 50 seront contactés.
  •  Les dernières lignes montrent les adresses IP des serveurs MX distants. ( On remarque les mêmes serveurs dans les 5 lignes précédentes).

1.2 Set type =NS

L’enregistrement de ressource de type NS (Name Server) identifie les serveurs DNS de la zone DNS. Permet d’identifier le Serveur de noms autoritaire pour un domaine ou l'enregistrement NS du domaine.

> Set type = NS

1.3 Set type =SOA

> Set type =SOA


  • Primary Name Server :  Nom du serveur qui héberge actuellement la zone DNS principale et qui fait autorité sur la zone DNS. Le nom doit être un FQDN.
  • Responsible mail addr : indique l’adresse email de la personne responsable de la zone. Attention, l’adresse doit être de type user.exemple.lanet non user@exemple.lan.
  • Serial : Il s’agit d’un numéro de série en 32 bit qui s’incrémente à chaque fois qu’une modification intervient sur le serveur. Ce numéro est de type : YYYYMMDDnn (Année, mois, jour, version). (Changement intervenu le 24 Juin 2008 en version 1). Si il y d’autre modification dans la même journée, le numéro de version s’incrémente.
  • Refresh :  Le nombre de seconde depuis que le second serveur à reçu une copie de la zone. Entre parenthèse est indiqué le temps avant la prochaine vérification pour obtenir une nouvelle copie.
  • Retry : Nombre de seconde que le premier serveur doit attendre dans le cas ou un refresh à échoué, avant d’effectuer un nouveau refresh avec un second serveur DNS.
  • Expire : Nombre de seconde avant qu’un serveur secondaire ne considère ses informations de zone comme n’étant plus autoritative. Si la copie que le serveur détient est plus vieille que 28 jours, elle est considérée comme invalide.
  • Default TTL (Time to live) =  Nombre définit en seconde, qu’un enregistrement de zone est valide dans le cache.

1.4 Set type =PTR

> Set type =PTR
> Adresse IP

Les enregistrements PTR(PoinTeRs, pointeurs ) sont des requêtes inversés vers des noms d'hôtes.

1.5 Set type =A

> set type=A 
> nom d’hote

Les enregistrements A(Adresses lookups) constituent le type de requêtes par défaut lorsqu’on lance nslookup. Ce sont requêtes directes, nom vers adresse IP.

1.6 Set type =CNAME

> set type=CNAME 
nom d’hôte

DNS permet d'attribuer des alias à une machine. Les enregistrements CNAME (Canonical NAME) sont utiles pour renvoyer le nom principal d’une machine.  

1.7 Set type =AAAA

Il est également possible d'obtenir des adresses IPv6 :

> set type=AAAA ou bien set type=any

1.8 Set type =ANY

ANY est utilisé  pour retrouver tous les enregistrements.

Enfin pour quitter NSLookup, tapez exit.

Votre commentaire:

Votre pseudo :

Votre commentaire :

Saisir les caractres ci-contre dans le champ suivant :

27/11/2015 14:37:41
I'd like to take the job tadacip australia “Lion,” confirms Dickson. “You can always tell the cat family as they have three lobes at the bottom of the large pad. The dog family, like hyenas, only have two lobes and they also have claw marks at the front. Unless, of course, it’s a cheetah. Cheetahs are the only cats that can’t retract their claws.” He pauses and stares into the distance in the direction the tracks are heading. “I think now might be a good time to head back to the vehicle.”
27/11/2015 14:37:40
The National Gallery womenra reviews I argued unsuccessfully with my ex-colleagues that it was precisely the off-the-track ideas and sessions that were most valuable in Davos. Another session on financial architecture, the Doha round, China’s rise, or networked societies would probably add very little to the discussion. But Davos had carved out a place where CEOs were suddenly tossed into a discussion on death (my all-time favorite session), the meaning of history, or endangered languages. Perhaps those could fire some disused synapses and spark something new.
27/11/2015 14:37:39
Is this a temporary or permanent position? silvitra reviews The United States offers plaintiffs the prospect of larger recoveries than Canada, but they would need to prove a U.S. venue would be the most convenient and appropriate. Lawyers said that could be tough when the damages to the rural Quebec town and its residents would likely be at the heart of any suit.
27/11/2015 14:37:38
Where do you live? buy womenra During that speech, where Obama called for an end to the War on Terror as we know it, the president argued that drones are far more precise than conventional airpower or missiles and that invasions of soldiers lead to “a torrent of unintended consequences.” Obama’s overall message was that drone strikes lead to fewer civilian casualties, which translates into less civilian outrage.
27/11/2015 14:37:37
I saw your advert in the paper tab tadacip 10 mg For the first time in his career, Sanchez is not being enabled by the organization. The game plan is simple: If Sanchez is the starter, it won’t be for long unless he finally figures things out, which doesn’t seem likely.
27/11/2015 14:37:35
When do you want me to start? silvitra online The end result was a shift out of equities and toward safehavens including the yen, Swiss franc and some sovereign debt.U.S. Treasuries also benefited from a view that the economicdamage done by a government closure would be yet another reasonfor the Federal Reserve to keep interest rates low for longer.
27/11/2015 14:37:34
Three years herbal yagara Most investors expect longer-dated U.S. Treasuries to hold up fairly well in the leadup to the debt ceiling showdown, and perhaps to rally even in the event of a default. That's what happened in 2011 when the U.S. credit rating was downgraded.
27/11/2015 14:37:33
Is there ? erexin-v ingredients Filner apologized earlier this month for disrespecting and sometimes intimidating women in an extraordinary video released immediately after the initial allegations surfaced. He said, I need help, and that he would be unable to lead San Diego if his behavior didn't change.
27/11/2015 14:37:32
What line of work are you in? penegra vs suhagra Language was inserted into the regulations in 2010 that outlines “limited certification” for employees who are not agents. “An individual who wishes to engage, on behalf of a Player Agent, in recruiting or providing client maintenance services, but does not engage in conduct requiring general certification, may be granted a limited certification as a player agent by the MLBPA,” reads the language in Section 2(C)(2) of the agent regulations.
27/11/2015 14:37:31
History vigora 50 germed The next month, Nabi, Alsarabbi and the informant picked up some jackets and hiking boots from a supplier. And later, at a meeting in a Queens hotel room, Nabi showed the undercover cop three ski jackets and three pairs of boots and said it was time “to make a move” and ship the gear to the Taliban.
27/11/2015 07:12:50
How much notice do you have to give? sildalis ervaring A. It’s not rocket science. The umpires should not be linked to anything that involves rewarding players. The players right now have the right to choose five starters and three relievers for the all-star team and the manager and MLB choose the rest. At that point there are some teams that need to have a player on the squad and other factors come into play. You’re overthinking here.
27/11/2015 07:12:49
I enjoy travelling dapoxetine diarrhea Past the heavy equipment, the road conditions deteriorated rapidly. There were rocks on the road, downed power lines and narrow sections I had to walk my bike through because it was too dangerous to ride. And then I arrived at the end of the road.
27/11/2015 07:12:48
Please wait dapoxetine availability in bangalore “However, our research shows that the power offenders use on their victims means children who are forced into performing acts on webcam or sending pictures can feel trapped, and some tragically go on to self-harm or in the worst cases take their own lives.”
27/11/2015 07:12:47
What's the current interest rate for personal loans? buy online revatio The defendants allegedly targeted retailers and other corporations engaged in financial transactions, or transmitting financial data. They took user names and passwords, means of identification, credit and debit card numbers and other corresponding personal identification information of cardholders, according to the indictment.
27/11/2015 07:12:45
I came here to work priligy generico en venezuela Tina Brown said, “It has been wonderful to grow the Women in the World summit into such a powerful independent brand within The Daily Beast and now it will be even more exciting to see how it can expand and develop.”
27/11/2015 07:12:44
this post is fantastic caverta org index Second-quarter profit was $660 million, or $1.18 per share, down from $711 billion, or $1.09 share, a year earlier. Analysts' average forecast was $1.33 per share, according to Thomson Reuters I/B/E/S.
27/11/2015 07:12:43
I'm a partner in efectos secundarios de la caverta The Mets are committed to a six-man rotation for the next few weeks to try and limit the innings of young right handers Matt Harvey and Zack Wheeler. Niese’s return would allow the Mets to continue that if they want despite the struggles of spot starter Carlos Torres.
27/11/2015 07:12:42
I like watching TV dangers of penegra Other changes, compared to the conventional X5, include minor cosmetic tweaks, specially designed roof rails and aerodynamically optimised lightweight alloy wheels. Three driving modes are offered: intelligent hybrid, pure electric or 'Safe Battery', which maintains the current charge level.
27/11/2015 07:12:41
How much is a First Class stamp? penegra uses Typhoon Utor, packing winds of 150 km per hour (93 mph) near its center and gusts of up to 185 kmph, regained strength as it moved out of northern Luzon island towards the South China Sea, headed west-northwest at 19 kmph, the officials said.
27/11/2015 07:12:39
I'm not working at the moment what are the side effects of caverta 50 Lindsay Lohan just can't seem to catch a break. The starlet found herself a mere hair away from a total wardrobe malfunction while exiting a helicopter in Brazil on March 30. Lohan, who was in the country to promote a clothing line, wore a slinky gray dress that slipped down to reveal more than she bargained for -- but luckily for the Mean Girls star her well-placed ponytail was there to save the day.
Nos partenaires : | | | | | | | | | | | | | | | | | | | | | | | | | | |