Resolve Device IP into Hostname in a Cisco Router

Memorizing the IP address of a few devices is easy, but it is very hard to remember every device’s IP address on the computer network. Sometimes, we forget the IP address of the device and then check the routing table or any other table on the computer. As we can’t remember every website IP address on the internet, So DNS works for us. We simply put its name in Google, and then Google’s DNS searches it for us. So it will be helpful for us if we memorize the device name, which we will Ping it through its name instead of the IP address. In this lab, we will perform “how to resolve device IP into hostname. So we will Ping by its name instead of the IP address.

Lab Topology

Configure the IP address on each router R1, R2, and R3 as shown in the below Lab.

Lab setup for Resolve Device IP Address into Host Name Cisco Router

Configuring IP and Ping routers.

Complete an IP configuration on all routers R1, R2, and R3 as shown below Lab, and then ping each router as shown below.

Ping R2 and R3 from R1.

Lab setup for Resolve Device IP Address into Host Name Cisco Router

What will happen if we Ping R2 through its name “R2”, then the router will try to resolve its host name into an IP address if we configure it.

Ping R2 hostname

As a router didn’t resolve its host name into the IP address. So, we are going to check the router hostname through the show hosts command.

show hosts at R1

Configuring IP host R1 at R2 and R3

We didn’t set the hostname on R1. We will resolve the hostname of R1 by host R2. So, set the hostname of R1 on R2. IP host command, followed by the router name and its IP address is used for it.

configure hostname of R1 at R2

Similarly, configure the hostname of R1 at R3. So R3 will ping R1 through its name R1 instead of its IP address. In this way, it will resolve the device IP into the hostname.

configure hostname of R1 at R3

Configure Host name of R2 and R3 at R1

We configured the hostname of R1 at R2 and R3. Similarly, configure the hostname of R2 and R3 at R1.

configure hostname of R2 and R3 at R1

Ping R2 and R3 from R1 through its host name.

Ping R2 hostname

Ping router R1 from Router R3 by its name.

ping R1 hostname From R3

Similarly, Ping R1 from R2 through its name.

ping R1 from R2

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *