Ubuntu: how to add kernel level routing?


In my Ubuntu server I have 5 NICs for five different subnet. There are some default kernel level routing which needs to be modified. The problem is NIC's ip and destination network is different.

For instance one NIC ip is and this NIC is supposed to transmit traffic to If I try adding route like:

route add -network mask gw dev eth0   

then kernel does not accept this route saying destination network unreachable. Can anyone help giving idea please?


You need to use -host because your giving an network with netmask for only one host. Also I think the syntax is -network Also I recommend to do it with the ip command, route is a bit rusty.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »