Default routing is used to send packets to the next-hop router for a remote destination network that is not in the routing table. Default routing should only be used in stub networks, which are the only way out of the network.
As you can see in the above picture, while R1 and R3 can be used defective routing, R2 cannot be applied. Because R2 has two outputs.
Router(config) #ip route 0.0.0.0 0.0.0.0 10.0.0.1
The above command means send all packets to output 10.0.0.1, wherever they come from. In order for this to be implemented, the router must have a single output. If it is applied to a router with 2 or more outputs, the packets that need to go to other outputs are directed to the output specified by default routing. This causes an error in the system.
R1(config) #ip route 0.0.0.0 0.0.0.0 10.0.0.1
R1(config) #ip classless
R3(config) #ip route 0.0.0.0 0.0.0.0 188.8.131.52
R3(config) #ip classless
All Cisco routers are classful routers. That is, they expect the router to have the default subnet mask on every interface. If the router receives a packet for a destination subnet that is not in the routing table, this packet will be discarded by default. If you use default routing, the IP classless command should be used, as it will be possible to not have remote subnets in the routing table.
12.4 In the IOS version, IP classless command is active by default. However, for reliability, always run the IP classless command when you use default routing.
Another command you can use to configure a gateway of last resort is the IP default-network command.
The three commands used for ISP to add a gateway of last resort to the gateway router are as follows (they all provide the same solution)
GatewayRouter(config) #ip route 0.0.0.0 0.0.0.0 184.108.40.206
GatewayRouter(config) #ip route 0.0.0.0 0.0.0.0 s0/0
GatewayRouter(config) #ip default-network 220.127.116.11
These three commands are the same, but there are some differences between them. First, the 2nd command, the output interface solution, is considered more than the other two, since it has 0 Advertisement distance. The 3rd command (IP default-network) broadcasts the default network when you configure an IGP (like RIP). Therefore, other routers in your network community will automatically receive this route by default.
I hope it was a useful article.