Linux – Adding a new route…

Leave a comment

May 8, 2012 by aubreykloppers

The command is quite easy:

route add -net <ip/prefix> gw <router ip>

Where the <ip/prefix> is example: 10.0.0.0/24

and <router ip> is your Router i.e.: 11.0.0.254

To make this persistent:

ip route add <ip>/16 via <router ip> dev eth0

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: