You are on page 1of 1

In UBUNTU to add a static route to ubuntu 1. #route add -net xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gw xxx.xxx.xx x.

xxx dev eth1 note: This is like adding the route temporarily. If you reboot the box t he route will be gone. To make it permament do the following To add a permanent route to the Ubuntu box 1. go to /etc/network folder 2. open the interfaces file 3. Append the following line at the end of the file. #cd /etc/network #vi interfaces -up route add -net xxx.xxx.xxx.xxx/xx gw xxx.xxx.xxx.xxx dev eth1 save and quit the file. now the route will be there even after the reboot. #netstat -rn (this is to view the routes)

You might also like