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
Woodrow
28/01/2015 21:53:44
Your account's overdrawn Caduet Coupon The DPJ held 44 seats up for grabs this time but was likely to come away with fewer than half that number, the Nikkei poll said. Other opposition parties like free market proponents Your Party could gain some seven seats, while the conservative Japan Restoration Party could get around six, Kyodo's poll shows.
Preston
28/01/2015 21:53:41
I'm in my first year at university Elimite For Lice The last funny case of having too much fun during the program happened in 2008 when Michael Beasley, Mario Chalmers and Darrell Arthur had some extracurricular activities. As you know, Beasley was just busted for a marijuana arrest this week, and he hasn’t had the stellar career that was promised up to this point.
Wilfred
28/01/2015 21:53:39
Could you ask her to call me? Order Elimite Uninsured = drag on the system. Historically, medicaid ended up covering all of those people (Doctors still got boat payments to make). Therefore, one good thing about Obamacare is that it makes the deadbeats pay into the pool. Finally.
John
28/01/2015 21:53:38
The manager levaquin 250 mg tablet Arms control activists and rights groups say one person dies every minute as a result of armed violence and the treaty is needed to halt the uncontrolled flow of arms and ammunition that they say fuels wars, atrocities and rights abuses.
Norberto
28/01/2015 21:53:36
Sorry, you must have the wrong number levaquin 250 mg KUALA LUMPUR, Sept 13 (Reuters) - State investor 1MalaysiaDevelopment Bhd (1MDB) has boosted the target size of its IPOfor its energy assets to around $3 billion, a person with directknowledge of the plan told Reuters, as the fund looks to repaydebt incurred in a shopping spree for power plants.
Alvaro
28/01/2015 21:53:35
I want to report a What Is Permethrin Nothing like running into a couple of Hollywood vampires during a night out in Los Angeles! Kristen Stewart managed to crack a smile while posing for an Instagram photo shot by fan Laura Austin, who snapped this pic of her friend Lany Morrison with the usually straight-faced starlet and her Twilight beau Robert Pattinson. They seemed really happy, said Austin, who ran into the couple outside L.A.'s Ye Rustic Inn. It's rare to see Kristen Stewart with a smile. The actress has reason to be happy! Stewart finally reunited with Pattinson after reportedly being separated for 64 days while he was away filming in Australia.
Perry
28/01/2015 21:53:33
Accountant supermarket manager order effexor xr It can be tempting, particularly if you don’t happen to be raising children in one of the hothouse communities Dr. Luthar studies, to dismiss this hyper-education as a frivolous, albeit painful, form of conspicuous consumption, like cosmetic surgery or flashy cars. But the truth is that these parents and children are responding rationally to a hyper-competitive world economy.
Stuart
28/01/2015 21:53:32
How do I get an outside line? Permethrin For Scabies Greece's descent into a deep economic crisis has triggeredpublic anger against a political and business elite widelyviewed as privileged and corrupt, prompting prosecutors to stepup investigations into corruption cases.
Gaston
28/01/2015 21:53:29
I've got a full-time job Caduet 10 Mg History repeats itself. Nuclear power is safe – then Chernobyl. Medical testing is safe – then Thalidomide. GM foods are tested safe – then X. The first principle of life is never trust someone trying to sell you something. 100 years of testing would be much more comfortable than 20 – and it must be done in an crowd source way and not by lab technicians whose bonus depends on approving things as ‘safe’. The age of the man in the street trusting the president/NSA/banks/business/medical/sci entists/whoever based on a vague belief in human nature is hopefully gone.
Garfield
28/01/2015 21:53:28
I hate shopping effexor generic brand On this week's Daily News Fifth Yankees Podcast, Mark Feinsand is joined by WFAN's Sweeny Murti during the final day of the season at Yankee Stadium as they talk about Mariano Rivera's emotional Bronx farewell.
Gustavo
28/01/2015 21:12:05
Canada>Canada effexor xr 75mg coupon The U.S. District Court in Washington called the Fed's cap arbitrary and capricious. Judge Richard Leon also suggested in the ruling that the Fed should reconsider earlier staff proposals to lower the fee to 12 cents.
Stephan
28/01/2015 21:12:04
I came here to study buy effexor xr 150 He got out of his car and went crazy, a source told People. He reached into the photographer's car, grabbed the camera equipment and threw it into the street. Lamar was very upset and seemed beyond stressed out.
Pablo
28/01/2015 21:12:03
Insufficient funds effexor xr cost in mexico Yehia Mikkia said early Saturday that the overnight night clashes between Morsi supporters and security forces have overwhelmed the hospital operating from the sit-in where the protesters have been camped for over three weeks. 
Gobiz
28/01/2015 21:12:02
Best Site good looking levaquin 250 mg cost Although a crisis team was able to briefly establish communication with the man, Rodriguez told The Associated Press talks eventually just fell apart with the gunman, who was holding two hostages on the fifth floor. Both of them survived when officers stormed the building, fatally shooting the gunman during an exchange of gunfire.
Ollie
28/01/2015 21:12:00
I'd like to speak to someone about a mortgage Caduet Generic The case has been delayed several times by unusual turns including arguments over whether Hasan could keep a beard against Army regulations and whether he could represent himself in the court martial. He is representing himself.
Monty
28/01/2015 21:11:58
Where's the postbox? effexor xr 37.5 mg capsule Imagine a bathtub beneath the earth. If geologic conditions are right, water can be added to such a basin, supplementing naturally occurring groundwater and creating a reserve for future use, much like a water tank.
Maynard
28/01/2015 21:11:57
I love the theatre effexor xr 150 mg ndc The conflicting news took the shine off markets, which hadbeen buoyed by hopes of a breakthrough. U.S. stock index futures fell as much as 0.5 percent, trimming some ofThursday's 2 percent rally. They last traded 0.2 percent lower.
Addison
28/01/2015 21:11:57
very best job cheap effexor xr Investors are not at risk of losing any money from these glitches unless they are unlucky enough to be buying or selling a stock at the exact moment when an error occurs, forcing them to cancel their trades.
Ernie
28/01/2015 21:11:55
Can I use your phone? Atorvastatin Calcium 10 Mg “God, he was on base in eight times in three games, if not more, in Milwaukee, so it’s not just for the hits, it’s the base on balls too,” the Mets’ manager said of Davis’ first few games back in the majors after a 24-game stretch in Triple-A. “Last night there was a couple times he got himself out. He got ahead in the count, I turned him loose and he got called with a checked swing. If you’re gonna swing, then swing the sucker.
Raymon
28/01/2015 21:11:54
I'm on work experience Permethrin Online I will never buy Smithfield again if this happens. The Chinese should not be allowed to have control of our largest pork producer, tens of thousands of contracts with American companies, control of hundreds of American farms, and control over the lives of tens of thousands of people in rural America. This is the same company that just got caught last year selling toxic meat on the Chinese market and we dare to allow them into our food chain! Treason!
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