See here’s router 1 acting as PC 1
ping 10.1.10.254
it’s the device that we're going to configure is its default gateway
I'll turn off debugging and use the command sh ip route
Notice the router has no gateway of last resort set and has no static routes.
Now we need to configure the device
with a default gateway or static default route.
Routing is currently enabled on this router
so I need to use the command ip route
and specify a static default route of 10.1.10.254
so now show ip route
shows us that the gateway of last resort is 10.1.10.254
which is the HSRP router
and we have a static default route configured.
Here is PC 2, so let’s do something different on PC 2.
So here’s router 2 acting as PC 2 enable sh ip route
Now what I’m going to do is type no ip routing
this will disable routing on this router
so when I use the command sh ip route now
notice we don’t see the routes that we saw previously.
Now when you disable IP routing on a router
you need to use the command IP default gateway
and not the command IP route and specify static route.
On router 1, I configured a static default route
because routing is enabled on this router.
We can see as an example the routing table
but on this device, because routing is disabled
I need to use the IP default gateway command
and in this case, the default gateway is the HSRP router on VLAN 20.
So can it ping the HSRP router on VLAN 20? Yes, it can.
Can it ping router 1 10.1.10.11 this IP address? Yes, it can.
Can router 1 ping 10.1.20.12 in other words, this IP address
which is the IP address of router 2? Yes, it can.
Now we can prove that the pings are working by doing debug ip icmp again
and then running the ping and notice we see the output.
So I'll move it up a bit and there you can see the echo replies being sent.
So pings are working between router 1 and router 2.