I want to set a default gateway using the ip route
command, since I'm under the impression that ip
is newer and preferred. If I'm not mistaken, ip
is included in a minimal CentOS installation and not route
.
What's the equivalent of route add default gw 192.168.1.254 eth0
using ip route add
?
Try ip route add default via <host> dev <dev>, e.g.:
Or you can replace the existing default route: