Книга: Acing the CCNA Exam: Volume 2 Advanced Networking and Security
Назад: Part 1. Network services
Дальше: Part 2. Security fundamentals

3 to access Google Maps. An address like this is called a Uniform Resource Identifier (URI) or Uniform Resource Locator (URL); I’ll use the latter ter is an example of a URL; it identifies the resource (the Google Maps website) and tells your computer how to access it.

A URL consists of multiple elements; most URLs you encounter will include a scheme, authority, and path, as shown in figure 3.1. The scheme indicates the protocol that the browser will use to send its request to the web server—HTTPS, in this case. The authority indicates the name of the web server that the browser should send the request to; in this case, it’s Google’s web server at www.google.com. This name is called a domain name—more on domains and their names in section 3.1.3. The final element is the path, which identifies the specific resource on the server; in this case, it’s the /map into the address bar and pressing Enter instructs the browser to use the HTTPS protocol to request the /maps resource on the www.google.com server. This is where DNS comes into play: your computer now has to translate the domain name into an IP address that it can send packets to.

Note If you don’t specify a URL’s scheme when using a web browser, the browser will assume the default scheme—usually HTTPS. If you don’t specify the resource, you will be shown a default page, such as index.html or index.php. You can try it on my website: should show the same page as .

3.1.2 Name resolution

to an IP address and then uses HTTPS to acces. You can view all of the available records or filter by type (A, AAAA, CNAME, etc.).

A DNS A record (address record) maps a domain name to an IPv4 address. All of the examples in this chapter so far have been A records. For another example, the A record for manning.com points to the IP address 35.166.24.88 (at the time of writing). . Instead, there is a CNAME record pointing to jeremysitlab.com. This means that you will be taken to the same page, regardless of whether you visit or . is called a Uniform Resource Identifier (URI) or Uniform Resource Locator (URL)—a URL is a type of URI that identifies both the resource (the web page) and how to locate it.

  • A URL consists of multiple elements, such as the scheme—the protocol that should be used to access the resource (https); the authority—the server that hosts the resource (www.google.com); and the path—the specific resource on the server (/maps).

  • When you type a URL into a web browser, your computer will use DNS to translate the authority (the domain name of the server) into an IP address.

  • DNS lookups consist of a DNS query from the client and a DNS query response from the server. The client will then store the name-to-IP-address mapping in temporary storage called the DNS cache for future use.

  • Client devices learn the IP address of their DNS server either via Dynamic Host Configuration Protocol (DHCP) or manual configuration.

  • DNS queries are sent to port 53 on the DNS server. Standard queries and responses use UDP, but TCP is used in certain situations.

  • DNS is a hierarchical naming system, organized in a tree-like structure. A domain is a subtree of that structure.

  • The root domain (.) is at the top of the DNS hierarchy, and there are various top-level domains (TLDs) under it, such as com. Each TLD has various second-level domains (SLDs) under it, such as google.com, and each SLD can have various subdomains, such as www.google.com.

  • A domain name that specifies its exact location in the DNS hierarchy is called a fully qualified domain name (FQDN). The dot at the end of an FQDN is a delimiter between the TLD and the root domain, which has no name; the dot is often omitted.

  • A domain name that only includes partial information, such as only the hostname configured on the device, is a partially qualified domain name (PQDN).

  • When a host sends a DNS query to its DNS server, it sends a recursive query—a query that asks for a definite answer: an IP address or an error message stating that the domain name could not be resolved. The DNS server responsible for resolving recursive queries is called a recursive resolver.

  • The recursive resolver will then send a DNS query to a root DNS server—a DNS server at the top of the DNS hierarchy. This is an iterative query—a query that can be answered with an IP address or with a referral to another DNS server.

  • The root server will refer the recursive resolver to a TLD server—a DNS server responsible for the relevant TLD.

  • The TLD server will refer the recursive resolver to an authoritative DNS server—a server that holds the definitive set of records for the specific domain and can, therefore, give a definite answer in reply to queries.

  • After receiving a response from the authoritative server, the recursive resolver will reply to the client’s recursive query.

  • Caching is used at every step of the name resolution process to reduce the number of DNS queries required. For example, if the recursive resolver had a cached entry for the domain name that the client queried, it would reply with that information.

  • DNS records can contain information other than IP addresses. Some record types include A, AAAA, CNAME, MX, NS, PTR, and SOA:

  • Beyond forwarding packets and frames, network devices like routers and switches don’t participate in DNS exchanges between DNS clients and servers. However, Cisco IOS devices themselves can be DNS clients and servers.

  • Cisco IOS devices need the ip domain lookup (or ip domain-lookup) command to be able to send queries to DNS servers; this command is enabled by default.

  • Use ip name-server ip-address to specify the device’s DNS server—the server it will send DNS queries to.

  • Use ip dns server to configure the device as a DNS server to allow it to respond to clients’ DNS queries.

  • Use ip domain name name (or ip domain-name name) to configure the device’s default domain name. It will automatically append this domain name to DNS queries that don’t specify a domain name.

  • Use ip host name ip-address to manually configure name-to-IP-address mappings. This is useful for hosts in the internal network.

  • Use show hosts to display all name-to-IP-address mappings, including manually configured mappings and those learned via DNS.

  • Назад: Part 1. Network services
    Дальше: Part 2. Security fundamentals