Both will work but there is an important (performance) difference between the two. Let’s say we are using Ethernet. Here’s the first static route:
ip route 0.0.0.0 0.0.0.0 192.168.1.1
When your router wants to forward a packet that has matched this default route then it has to put the packet in a L2 frame. It checks the next hop address, does an ARP request, gets a reply and is able to forward the packet. Life is good.
Here’s another static route:
ip route 0.0.0.0 0.0.0.0 GigabitEthernet 0/1
This time we use an interface as the next hop. When your router wants to forward a packet with the interface as next hop then it has no idea what to use as the destination MAC address in the L2 frame. Ethernet is multi-access so that means there could be more than one device on the other end.
If you use a static route like this then the router will assume that the destination address in your packet is DIRECTLY CONNECTED to that Ethernet interface. This means that it will do an ARP request for each and every packet that it tries to deliver.
You can see it in action here:
R1(config)#ip route 0.0.0.0 0.0.0.0 GigabitEthernet 0/1
R1#debug arp ARP packet debugging is on
R1#ping 18.104.22.168 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 22.214.171.124, timeout is 2 seconds: *Mar 31 06:43:14.464: IP ARP: creating incomplete entry for IP address: 126.96.36.199 interface GigabitEthernet0/1 *Mar 31 06:43:14.465: IP ARP: sent req src 192.168.1.1 fa16.3ecf.35bc, dst 188.8.131.52 0000.0000.0000 GigabitEthernet0/1.
R1#ping 184.108.40.206 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 220.127.116.11, timeout is 2 seconds: *Mar 31 06:44:33.295: IP ARP: creating incomplete entry for IP address: 18.104.22.168 interface GigabitEthernet0/1 *Mar 31 06:44:33.296: IP ARP: sent req src 192.168.1.1 fa16.3ecf.35bc, dst 22.214.171.124 0000.0000.0000 GigabitEthernet0/1.
It will work but it’s a performance killer. Keep in mind this is only a problem on multi-access interfaces.
On serial interfaces (or other point-to-point interfaces) this doesn’t matter since there is only one device on the other end. Your dialer interface is also point-to-point. Configuring the IP address of the ISP will also work but it won’t matter.
Hope this helps!