Configure permanent static route on Ubuntu or Debian

How to Configure permanent static route on Ubuntu or Debian

1. Configure Permanent static routes in /etc/networking/interfaes

root@ubuntu:~# vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).# The loopback network interface
auto lo
iface lo inet loopback# The primary network interface
auto eth0
iface eth0 inet dhcp
up route add -net eth0

2. Restart Network to take affect

root@ubuntu:~# /etc/init.d/networking restart

3. Checking Route on your System

root@ubuntu:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default UG 100 0 0 eth0 * U 0 0 0 eth0 * U 0 0 0 eth0

That’s all. Thanks for using



Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>