ownilink
October 4th, 2011, 01:39 PM
Hi all,
Lately I've been starting to use Ubuntu (11.04). I love it! I'm still a beginner, but I learn more with time.
I want to add some persistent routes in /etc/network/interfaces.
I've been looking on the internet and on the forum but i cant seem to get it work.
If I type "sudo route add -net 192.168.30.2 gw 172.21.1.1 netmask 255.255.255.255" in a terminal the route gets added fine. But ofc this route is not persistent.
This is how my interfaces file looks(how i think that it should work):
auto lo
iface lo inet loopback
up route add -net 192.168.30.2 gw 172.21.1.1 netmask 255.255.255.255
After, I use the sudo /etc/init.d/networking restart and i get this:
/etc/network$ sudo /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... Ignoring unknown interface eth0=eth0.
[ OK ]
But if i use the "route" command after it doesnt show my route.
Any help will be appreciated.
Thanks,
Ferenc
Lately I've been starting to use Ubuntu (11.04). I love it! I'm still a beginner, but I learn more with time.
I want to add some persistent routes in /etc/network/interfaces.
I've been looking on the internet and on the forum but i cant seem to get it work.
If I type "sudo route add -net 192.168.30.2 gw 172.21.1.1 netmask 255.255.255.255" in a terminal the route gets added fine. But ofc this route is not persistent.
This is how my interfaces file looks(how i think that it should work):
auto lo
iface lo inet loopback
up route add -net 192.168.30.2 gw 172.21.1.1 netmask 255.255.255.255
After, I use the sudo /etc/init.d/networking restart and i get this:
/etc/network$ sudo /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... Ignoring unknown interface eth0=eth0.
[ OK ]
But if i use the "route" command after it doesnt show my route.
Any help will be appreciated.
Thanks,
Ferenc