Routers General

Routers have two main functions: determining the best path to available networks, and forwarding traffic to those networks.

Specifically, they are used to route traffic between different IP subnets on a network. The router reads the packet’s IP address to determine the next hop towards the destination. Because the routing happens at OSI Layer 3 - Network, they are also known as “layer 3 devices”.

Note

Routers also operate at L2 and L1, and have at least awareness of OSI layers up to Layer 7. However, routing in itself is a Layer 3 operation.

Unlike switches, routers support many types of interfaces, such as Ethernet, Serial, ISDN, ADSL, etc.

Note

Layer 3 switches exist, which allow for communication across different subnets. However, even L3 switches cannot communicate with a WAN directly.

DNS on Cisco devices

General DNS commands for Cisco Routers:

DNS Client:

ip domain-lookup # To lookup DNS servers
ip name-server <ip address> # IP of the DNS server
ip domain-name <domain-name> # Primary domain name
ip domain-list <domain-name> # additional DNS suffixes

Note

A router doesn’t need to be set up as a DNS client to pass through DNS requests. This is done only if we want the router itself to resolve FQDNs.

Additionally, if we want the router to also function as a DNS Server we must also include the following:

ip dns server
ip host <hostname> <ip address> # For each host that we want to be able to resolve.

Info

Usually we don’t want Cisco routers to function as DNS server. This will often be done with another 3rd-party server.