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 google.fr.

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
> gmail.com

  • Les deux premières lignes indique le nom et l’adresse IP du serveur DNS local.
  • Les cinq lignes suivantes montrent que le domaine gmail.com à 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
> microsoft.com

1.3 Set type =SOA

> Set type =SOA
> microsoft.com

 

  • 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
> www.kame.net/

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 :
 Rafraichir

PseudoCommentaire
Amia
23/05/2015 21:14:10
What do you like doing in your spare time? silvitra The album “is about that stress, that feeling, that pressure of like every 30 days having to worry about rent, the bills, of making the quota or whatever,” says vocalist Marisol (La Marisoul) Hernandez.
Nathan
23/05/2015 21:14:09
Could I have a statement, please? super p force test But we remain determined to ensure anyone who works hard and wants to become a homeowner has help to do so, and that's why we've introduced schemes like NewBuy and Help to Buy, which offer a valuable alternative to the bank of mum and dad and enable people to buy with a fraction of the deposit they would normally require.
Wesley
23/05/2015 21:14:08
Could I have an application form? silvitra cheap His admonishment comes as the government has stopped speaking about security matters, preferring to talk up Mexico's economic potential, along with the prospect of achieving long-pending changes to the state-run energy sector. Vera, whose diocese in northern Mexico started one of the first support services for the families of the more than 25,000 who have gone missing during the drug war, refuses to stay silent on a security crackdown he has never supported and considers badly carried out.
Dewey
23/05/2015 21:14:07
Do you know each other? megalis 20 mg price One billion podcasts pales in comparison to Android's one billion device activations. Apple has become the master of owning worthless numbers. Apple doesn't get anything out of it which adds zero value to Apple as far as Wall Street is concerned.
Byron
23/05/2015 21:14:06
Which year are you in? staxyn price cvs While the ITC was created to ensure that U.S. companies cancompete fairly against imports, a number of foreign companieswith U.S. manufacturing plants have filed patent complaints withthe agency. Samsung has a plant in Austin, Texas.
Maurice
23/05/2015 21:14:04
I work for myself best price on staxyn The culture secretary said the draft charter included some really important changes in an attempt to appease the press, but said there would be no movement on how the system could be amended.
Daryl
23/05/2015 21:14:03
I'll text you later forzest 10mg price BlackBerry shares rose more than 10 percent to $10.78 in New York and C$11.13 in Toronto in afternoon trading. But the shares remain well below their levels in June, before the company reported dismal results that included poor sales of the BlackBerry 10 that it viewed as key to a turnaround.
Christopher
23/05/2015 21:14:02
I live in London sildenafil citrate malegra 100 A Cabinet Office spokesman said: The Government is very grateful to Graham Allen and his committee for the work they have done over the summer to produce this report. We welcome the fact that the committee agrees with the need for this legislation and we will of course consider the findings carefully and respond in due course.
Damon
23/05/2015 21:14:01
It's OK super p force mastercard The main instrument for accomplishing that change would be a new National Sustainability Policy that could be created by presidential executive order, similar to a National Ocean Policy created by the Obama administration two years ago.
Eliseo
23/05/2015 21:14:00
I can't get through at the moment apcalis oglasi As with anything, it really comes down to human capital andthere simply isn't enough of it, says Chris Finan, White Housedirector for cyber security from 2011-12, who is now a seniorfellow at the Truman National Security Project and working for astart-up in Silicon Valley.
Mario
23/05/2015 20:45:18
What are the hours of work? apcalis wirkung With many Capitol Hill staff members off work because of theshutdown and Boehner meeting with Obama in the White House onWednesday evening, the speaker's office did not immediatelyrespond to questions about the Chamber's letter or the speaker'srelationship with the business community.
Efren
23/05/2015 20:45:13
Can you hear me OK? buy malegra fxt That, though, is when Williams took over. The 20-year-old Stephens' time at the top of tennis may come. For now, the 31-year-old Williams is still as good as it gets, and she won eight of the last nine games to beat Stephens 6-4, 6-1.
Isaac
23/05/2015 20:45:11
I work for myself cheap yagara In Germany, the IFO business climate index for July isexpected to have inched higher, but the economy is hobbled bythe reluctance of firms to invest and by soft global demand:Germany's purchasing managers' index (PMI) for manufacturing hasbeen stuck below the boom-bust line of 50 since February.
Genaro
23/05/2015 20:45:10
No, I'm not particularly sporty where to buy staxyn online Mr Davies said the weaker results were a combination of low expectations, poor teaching in some cases and the current set up of the GCSE, which allows schools not to enter pupils for higher grade material which Mr Davies said too many schools in Wales were doing.
Zoey
23/05/2015 20:45:08
Can I take your number? super p force dapoxetine Let’s not forget that diplomats owe the city $17 million in unpaid parking tickets. And, since a federal appeals court ruled in 2010 foreign countries don’t need to pay property tax for their Manhattan buildings, containing UN missions and ambassadors’ apartments, the city has lost tens of millions of dollars in tax revenues.
Leland
23/05/2015 20:45:07
A Second Class stamp megalis generic The designation triggers direct participation by high-level FDA officials in helping devise creative research plans to expedite review and possible approval. Because these are by definition revolutionary drugs, the FDA and drugmakers meet more frequently and work together more closely to speed the benefits to patients.
Porter
23/05/2015 20:45:06
How long have you lived here? super p-force kamagra Standard & Poor's equity analyst Tuna Amobi said Netflix appeared to be gaining traction in some of its newest markets, and noted that Orange is the New Black will end the year as the company's most-watched original series.
Roosevelt
23/05/2015 20:45:04
A book of First Class stamps malegra ve ya Investors surveyed by Citigroup see a slow ramp-up, andlower turnout. They expect 4 million people to buy insurance onstates' Obamacare exchanges for 2014, with 500,000 to 650,000 ofthose in signing up in October.
Lynwood
23/05/2015 20:45:03
Enter your PIN megalis 20 tablet side effects As the state called its final witnesses and the defense launched its case last week, jurors heard from family members of Zimmerman and slain Florida teen Trayvon Martin. Both Martin's mother and Zimmerman's mother said they recognized their sons as the person screaming for help in the background of a disputed 911 call. The call is a crucial piece of evidence because it could provide clues as to who was the aggressor in the fatal Feb. 26, 2012 confrontation.
Michal
23/05/2015 20:45:02
I've been cut off super p force bodybuilding In his response to the original article, the Labour leader wrote: “Fierce debate about politics does not justify character assassination of my father ... I know they say 'you can’t libel the dead’, but you can smear them.” In television interviews today, Mr Miliband said: “I was appalled when I read the Daily Mail on Saturday and saw them saying that he hated Britain. It’s a lie. I’m even more appalled that they repeated that lie today and have gone further and described my father’s legacy as 'evil’. Evil is a word reserved for particular cases and I was not willing to let that stand.”
Nos partenaires : www.bestof-microsoft.com | www.exchangedump.com | www.exchangedump.com | www.formation-exchange.com | www.formation-management-dif.com | www.formation-mcpd.com | www.formation-pmp.com | www.formation-seven.com | www.formation-windows-7.com | www.formation-windows7.com | www.formation-windows-seven.com | www.certification-mcpd.com | www.certification-windows-7.com | www.consulting-exchange.com | www.e-managementinstitute.org | www.certification-mcitp.com | www.formation-mcsa.com | www.bestof-exchange.com | www.exchange-consulting.com | www.bestof-voip.com | www.formation-cisco.com www.formation-mcitp.com.com | www.laboratoire-exchange.com | www.messagerie-consultant.com | www.bestof-windows.com | www.bestof-sharepoint.com | www.messagerie-consultants.com | www.formation-mcts.com | www.consultant-messagerie.com