Someone deleted a route on ops. Now:
learner@ops:~$ ping -c 2 8.8.8.8
ping: connect: Network is unreachableNetwork is unreachable means no route in the table matches the address, so ops doesn't send anything at all. Compare ip route with the last lesson's table.
sudo ip route add default
Adds a default route: anything no other route matches goes to that router. The router has to be on a network the machine is on.
sudo ip route add default via 10.0.0.1If ops already has a default route, even via another router, adding one says RTNETLINK answers: File exists. Delete the wrong one first, then add yours:
sudo ip route del defaultNow ping again. The lab has no internet, so nothing answers past the office router: you'll get 100% packet loss instead. That's progress: the packets leave ops now, and don't come back.
Objectives
- Find the missing route.
- Add it back.