I'm trying to set up my routes in a way that will allow me to connect to Vagrant box of Solum demo.
My routing table contains, but is not limited to, following routes:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
192.168.76.0 192.168.76.2 255.255.255.0 UG 0 0 0 vboxnet0
192.168.76.0 0.0.0.0 255.255.255.0 U 0 0 0 vboxnet0
I'm suspecting the third route (automatically generated on Vagrant box startup) is interfering with the second route (created manually), so I'm trying to delete it.
However, using either of following commands
$ sudo route del 192.168.76.0 gw 0.0.0.0
$ sudo route del 192.168.76.0
returns:
SIOCDELRT: No such process
which usually pops up when route
can't find the route.
On the other hand, using
$ sudo route del 192.168.76.0/24 gw 0.0.0.0
$ sudo route del 192.168.76.0/24
yields:
route: netmask 000000ff doesn't make sense with host route
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables
(rest of usage)
What am I doing wrong? Is there a reason I can't remove that route? Am I wrong in assuming that it interferes with the one I set up?
(I'm using Ubuntu 14.04+).
route del -net 192.168.76.0
. Otherwise it thinks that you are trying to delete a route to a single host.route add -net 192.168.78.0/24 192.168.76.2
which makes much more sense./24
to the end of the command, it works. Thank you. If you post an answer, perhaps with some elaboration in the interest of the people who will browse this question in the future, I will accept it.