Jeremy’s IT Lab lecture video:
Commands
Commands List
DNS Show Commands
14. DNS
Link to original
- show hosts
-->Shows the configured hosts as well as hosts learned and cached through DNSDNS Global Commands
DNS
Link to original
- ip dns server
-->Configures the router to act as a DNS server- ip domain lookup
/ip domain-lookup-->Enables the router to perform DNS queries (enabled by default)- ip host host-name ip-address
-->Configures a host address mapping to be used for DNS queries- ip name-server ip-address
-->Configures an external DNS server to query if a requested record isn’t available in the router’s host table- ip domain name domain-name
/ip domain-name domain-name-->Configures the default domain nameWindows IP-related Commands
IP Configuration Commands
IP Configuration Commands
Link to original
- Windows: ^networking-commands-windows
- General
- arp -a
-->Shows the ARP list- Ping host-name/ip-address [-n number-of-pings]
-->Pings the host or IP address with the specified number of pings- nslookup domain-name
-->Performs a DNS query to look up the domain name’s actual IP address- ipconfig
- ipconfig (General) ^ipconfig-general-windows
- ipconfig
-->Shows basic IP config info- ipconfig /all
-->Shows detailed IP config info- ipconfig (DNS) ^ipconfig-dns-windows
- ipconfig /displaydns
-->Displays information about the DNS cache- ipconfig /flushdns
-->Deletes the DNS cache- ipconfig (DHCP) ^ipconfig-dhcp-windows
- ipconfig /renew
-->Gets a new IP address via DHCP- ipconfig /release
-->Releases the PC’s DHCP learned IP address
DNS Info
DNS General Information
Domain Name System (DNS) is a protocol that’s used to resolve human-readable domain names (Ex. youtube.com) to IP addresses that can be understood by devices.
- It uses port 53 for communication through either the TCP or UDP protocol.
- When you type a domain name (Ex. google.com) into a web browser, your device will ask a DNS server for the IP address of that domain, so that it can reach it.
- The DNS server(s) your device uses can be manually configured or learned via Dynamic Host Configuration Protocol (DHCP).
- If the configured DNS server is an external server, when a device sends domain lookup requests, your router will simply forward the packets to the DNS server. (Therefore, no DNS configuration is required on the router. It is optional)
When does DNS use TCP or UDP on port 53?
- Standard DNS queries/responses typically use the UDP protocol.
- TCP is used for DNS messages greater than 512 bytes
- Port 53 is always used in both cases.
DNS Record Types
There are multiple DNS record types which store a variety of information. The most important ones for the CCNA are:
- DNS ‘A’ Records
- Used to map names to IPv4 addresses.
- DNS ‘AAAA’ Records
- Used to map names to IPv6 addresses.
Devices will save the DNS server’s responses to a locally stored DNS cache, meaning that they won’t have to query the server every single time they want to access a particular destination.
DNS Configuration on Windows
DNS settings and other networking settings can be seen and configured through the following commands on the Windows operating system:
Transclude of IP-Configuration-Commands#^ipconfig-general-windows
Transclude of IP-Configuration-Commands#^ipconfig-dns-windows
ipconfig- Provides basic information about the current device’s networking configuration.
ipconfig /all- Provides advanced information about the current device’s networking configuration, including the IP address, default gateway and DNS server.
ipconfig /displaydns^dns-cache- Shows the locally stored DNS cache on the device.
ipconfig /flushdns- Clears the current DNS cache on the device.
nslookup DOMAIN-NAME- Sends a DNS query from the host to a DNS server, in order to look up the actual IP address of the specified domain.
DNS Configuration on Cisco IOS
DNS doesn’t need to be configured on routers. When hosts in the network use DNS, the routers will simply forward the DNS messages like any other packet to the DNS server(s).
However, a Cisco router can be configured as a DNS server, as well as a DNS client.
show hosts- Shows all configured and cached DNS hosts as well as their IP addresses.
ip dns server- Configures the router to act as a DNS server.
ip host HOST-NAME IP-ADDRESS- Configures a list of hostname/IP address mappings.
ip name-server IP-ADDRESS- Configures a DNS server that the router will query if the requested record isn’t available in its host table.
ip domain lookuporip domain-lookup- Enables the router to perform DNS queries to the configured DNS server.
- (Enabled by default)
ip domain name DOMAIN-NAMEorip domain-name DOMAIN-NAME- Configures the default domain name.
- This will be automatically appended to any hostnames without a specified domain.
- (Ex. if the domain name is kruber.party, then PC1 would become reachable at PC1.kruber.party)
Jeremy’s IT Lab előadásvideó:
Parancsok
Parancslista
DNS Show Parancsok
14. DNS
Eredeti hivatkozása
- show hosts
-->Megjeleníti a konfigurált hostokat, valamint a DNS által feloldott és gyorsítótárazott hostneveketDNS Globális Parancsok
DNS
Eredeti hivatkozása
- ip dns server
-->Beállítja a routert, hogy DNS szerverként működjön- ip domain lookup
/ip domain-lookup-->Engedélyezi a routernek a DNS lekérdezések végrehajtását (alapértelmezetten engedélyezett)- ip host host-name ip-address
-->Statikus hostnév - IP cím hozzárendelést konfigurál a DNS lekérdezésekhez- ip name-server ip-address
-->Külső DNS szervert állít be, amelyet a router lekérdez, ha egy kért rekord nem szerepel a host táblájában- ip domain name domain-name
/ip domain-name domain-name-->Beállítja az alapértelmezett domain nevetWindows IP-vel kapcsolatos Parancsok
IP Konfigurációs Parancsok
IP Konfigurációs Parancsok
Eredeti hivatkozása
- Windows: ^networking-commands-windows
- Általános
- arp -a
-->Megjeleníti az ARP listát / gyorsítótárat- Ping host-name/ip-address [-n number-of-pings]
-->Pingeli a megadott hostot vagy IP címet a megadott darabszámmal- nslookup domain-name
-->DNS lekérdezést hajt végre a domain névhez tartozó IP cím feloldására- ipconfig
- ipconfig (Általános) ^ipconfig-general-windows
- ipconfig
-->Alapvető IP konfigurációs információkat jelenít meg- ipconfig /all
-->Részletes IP konfigurációs adatokat listáz- ipconfig (DNS) ^ipconfig-dns-windows
- ipconfig /displaydns
-->Megjeleníti a helyi DNS gyorsítótár tartalmát- ipconfig /flushdns
-->Kiüríti a helyi DNS gyorsítótárat- ipconfig (DHCP) ^ipconfig-dhcp-windows
- ipconfig /renew
-->Új IP címet kér DHCP-n keresztül- ipconfig /release
-->Elengedi a PC DHCP által kapott IP címét
DNS Információk
DNS Általános Információk
A Domain Name System (DNS) egy olyan protokoll, amely az ember által olvasható domain neveket (pl. youtube.com) oldja fel (resolve) a hálózati eszközök által értelmezhető IP címekké.
- Az 53-as portot használja kommunikációra a TCP vagy UDP protokollon keresztül.
- Amikor egy domain nevet (pl. google.com) írsz a böngészőbe, a készülék megkérdezi a DNS szervert a domainhez tartozó IP címről, hogy elérhesse a kívánt szervert.
- Az eszköz által használt DNS szerver(ek) címe manuálisan is konfigurálható, vagy automatikusan kiosztható a Dynamic Host Configuration Protocol (DHCP) segítségével.
- Ha a beállított DNS szerver külső szerver, a domain feloldási kérésekkor a helyi router egyszerűen továbbítja (forward) a csomagokat a DNS szerver felé. (Így semmilyen speciális DNS konfiguráció nem szükséges a routeren, opcionális jellegű).
Mikor használ a DNS TCP-t vagy UDP-t az 53-as porton?
- A szabványos DNS lekérdezések és válaszok tipikusan a UDP protokollt használják.
- A TCP-t az 512 bájtnál nagyobb DNS üzenetek esetén alkalmazzák.
- Mindkét esetben a portszám az 53-as.
DNS Rekordtípusok
Többféle DNS rekordtípus létezik a különféle információk tárolására. A CCNA vizsga szempontjából a legfontosabbak:
- DNS 'A' Rekordok
- Hostneveket rendelnek IPv4 címekhez.
- DNS 'AAAA' Rekordok
- Hostneveket rendelnek IPv6 címekhez.
A hálózati eszközök a DNS szerver válaszait a helyi DNS cache-ben (gyorsítótár) tárolják, így nem kell minden egyes kérésnél újra lekérdezniük a szervert egy adott célállomás eléréséhez.
DNS Konfiguráció Windows Környezetben
A DNS beállítások és egyéb hálózati konfigurációk a következő parancsokkal tekinthetők meg és kezelhetők Windows operációs rendszeren:
Transclude of IP-Configuration-Commands#^ipconfig-general-windows
Transclude of IP-Configuration-Commands#^ipconfig-dns-windows
ipconfig- Alapvető hálózati konfigurációs információkat nyújt az aktuális eszközről.
ipconfig /all- Részletes hálózati beállításokat mutat, beleértve az IP címet, default gateway-t és a DNS szerver címét.
ipconfig /displaydns^dns-cache- Megjeleníti a helyi DNS gyorsítótár (cache) tartalmát.
ipconfig /flushdns- Kiüríti az aktuális DNS gyorsítótárat az eszközön.
nslookup DOMAIN-NAME- DNS lekérdezést küld a hosttól a DNS szervernek, hogy feloldja a megadott domainhez tartozó tényleges IP címet.
DNS Konfiguráció Cisco IOS-en
A routereken nem szükséges kötelezően a DNS konfigurálása. Amikor a hálózatban lévő hostok a DNS-t használják, a routerek egyszerűen továbbítják a DNS üzeneteket, mint bármely más IP csomagot a DNS szerver(ek) felé.
Azonban egy Cisco router beállítható DNS szerverként, valamint DNS kliensként is.
show hosts- Megjeleníti az összes konfigurált és gyorsítótárazott DNS hostot és a hozzájuk tartozó IP címeket.
ip dns server- Beállítja a routert, hogy DNS szerverként működjön.
ip host HOST-NAME IP-ADDRESS- Statikus hostnév - IP cím hozzárendelési listát definiál.
ip name-server IP-ADDRESS- Beállítja azt a DNS szervert, amelyet a router lekérdez, ha a keresett rekord nem található meg a helyi host táblájában.
ip domain lookupvagyip domain-lookup- Engedélyezi a router számára a DNS lekérdezések küldését a konfigurált DNS szervernek.
- (Alapértelmezetten engedélyezett)
ip domain name DOMAIN-NAMEvagyip domain-name DOMAIN-NAME- Beállítja az alapértelmezett domain nevet.
- Ez automatikusan hozzáfűződik a megadott domain nélküli hostnevekhez.
- (Pl. ha a domain név kruber.party, a PC1 elérhetővé válik mint PC1.kruber.party).