Say I have a routing table
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.2 30
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 On-link 192.168.0.2 286
192.168.0.2 255.255.255.255 On-link 192.168.0.2 286
192.168.0.255 255.255.255.255 On-link 192.168.0.2 286
===========================================================================
and I want to send a ping request to 192.168.0.3.
Newly created a packet with destination 192.168.0.3 (and source 127.0.0.1?) appears on the network. It will hit the rule 192.168.0.0/24 with interface 192.168.0.2. The packet gets source changed to 192.168.0.2 (based on this answer). It didn't hit the first rule, so it cannot use the gateway at the moment, yet somehow the packet leaves.
What are next steps in this case and why?
Pinging 192.168.0.3 with 32 bytes of data: Reply from 192.168.0.2: Destination host unreachable. Reply from 192.168.0.3: bytes=32 time=5ms TTL=64
– Jon Jan 22 '23 at 10:23GIven that, how come the default route is selected when it's back? There is still192.168.0.0/24` available - doesn't it apply because it was chosen the last time?