DNS / DHCP Flashcards
What is the purpose of DNS ?
DNS is used to resolve human-readable names (ex: www.google.com) to IP addresses
What are DNS “A” records used for ?
To map names to IPv4 addresses
What are DNS “AAAA” records used for ?
To map names to IPv6 addresses
How to view your local DNS cache ?
ipconfig /displaydns
How to clear your local DNS cache ?
ipconfig /flushdns
Where is the “hosts” file on your PC ?
Windows > System32 > drivers > etc
How to configure a router as a DNS server ?
R1(config)# ip dns server
R1(config)# ip host [name] [IP]
external DNS server in case R1 doesn’t have a record in its host table
R1(config)# ip name-server [IP]
R1(config)# ip domain lookup
(enables R1 to perform DNS queries, although its enabled by default)
To view hosts:
R1(config)# show hosts
What is DHCP ?
DHCP is used to allow hosts to automatically/dynamically learn various aspects of their network configuration such as IP address, subnet mask, default gateway, DNS server, etc without manual/static configuration.
What are the 4 messages of DHCP ?
1) DHCP Discovery:
Client -> Server
Searches for a DHCP server on the local network
2) DHCP Offer
Server -> Client
A DHCP offeres an IP address along with other info to the client
3) DHCP Request
Client -> Server
The client requests the IP address offered
4) DHCP Ack
Server -> Client
DHCP server acknowledges the request
What is a DHCP relay agent ?
Large businesses often use a centralized DHCP server but broadcast DHCP messages dont get forwarded by routers so they don’t leave the subnet. For this reason you’d need to configure the router to be a DHCP relay agent. This will allow the router to forward DHCP broadcast messages to a remote DHCP server as unicast messages.
How to configure a router to be a DHCP server ?
R1(config)# ip dhcp excluded-address [IP range start] [IP range end]
Addresses that wont be given to clients
R1(config)# ip dhcp pool [pool name]
R1(dhcp-config)# network [network address] [subnet mask / prefix]
R1(dhcp-config)# dns-server [DNS server IP]
R1(dhcp-config)# domain-name [domain name]
R1(dhcp-config)# default-router [default gateway]
R1(dhcp-config)# lease [days] [hours] [minutes]
How to view all DHCP clients
R1# show ip dhcp binding
How to configure a router to be a DHCP relay agent ?
R1(config)# interface [interface]
(client facing interface)
R1(config-if)# ip helper-address [DHCP server IP]
How to configure a router to be a DHCP client ?
R1(config)# interface [interface]
R1(config-if)# ip address dhcp