[Contents] [Prev] [Next] [Index] [Report an Error]

Configuring DNS

You can configure virtual routers to act as name resolvers for Domain Name Service (DNS). DNS is a client/server mechanism that maps IP addresses to hostnames.

The name resolver is the client side of DNS and receives address-to-hostname requests from its own clients when they want to contact hosts on other networks. By polling name servers, the name resolver learns name-to-address translations for the hosts its clients want to contact.

A name server may provide the translation from its cache or may poll servers lower in the DNS hierarchy to obtain a translation. Typically, name servers at the top of the hierarchy recognize top level domain names and know which servers to contact for information about more detailed domain names. See Figure 24.

Figure 24: DNS Hierarchy Example

Image g013075.gif

DNS messages from a name resolver to a name server must include the domain name for the resolver’s clients. Consequently, you must specify a default domain name for the clients. The default domain name is appended to unqualified hostnames (those without domain names).

The name resolver must be able to access at least one name server. Accordingly, you must configure a static route to a gateway that provides access to the name server and assign the name server to the name resolver. For more information, see Assigning Name Servers.

Each virtual router can have its own name resolver and domain name. However, if two virtual routers use the same name servers and belong to the same local domain, you do not need to configure name resolvers on both virtual routers. For more information, see Using One Name Resolver for Multiple Virtual Routers.

References

For more information about the DNS, consult the following resources:

Assigning Name Servers

To assign name servers to the system:

  1. Access the virtual router context.
  2. Define static routes to the gateways that provide access to the name servers.
  3. Enable the virtual router to query name servers.
  4. Specify a default domain name for the hosts.
  5. Specify the name servers.

    Example

    host1(config)#virtual-router boston
    host1:boston(config)#ip route 0.0.0.0 0.0.0.0 gatewayIpAddress
    host1:boston(config)#ip domain-lookup
    host1:boston(config)#ip domain-name urlofinterest.com
    host1:boston(config)#ip name-server 10.2.0.3
    host1:boston(config)#ip name-server 10.2.5.5

ip domain-lookup

ip domain-name

ip name-server

Using One Name Resolver for Multiple Virtual Routers

You can use one name resolver for multiple virtual routers if those virtual routers use the same name servers and belong to the same local domain. To do so, complete the following steps:

  1. Configure a name resolver for the first virtual router.
  2. Access the context for the second virtual router.
  3. Specify that the second virtual router should use the name resolver you configured for the first virtual router.
  4. Repeat Steps 2 and 3 for other virtual routers that you want to point to this name resolver.

Example

To configure the virtual router boston to use the same name servers as the default router, enter the following commands.

host1(config)#virtual router boston
host1:boston(config)#ip domain-lookup transit-virtual-router default

ip domain-lookup

Monitoring DNS

After you configure DNS, you can use the show ip domain-lookup command to view information about the name servers.

show ip domain-lookup


[Contents] [Prev] [Next] [Index] [Report an Error]