Manually adding a default route to a CentOS Linux host

I have come to rely on the CentOS and Fedora network initialization scripts to add default routes, but a situation occurred where I needed to add one manually. The route command syntax differs between Solaris, Linux and OpenBSD, so I thought I would jot down how I manually added a static route to my Linux host for future reference:

$ ip route add via dev bond0

One Comment

bschaefe  on April 11th, 2009

Ooh, good one. I never remember to note the quick-and-easy template and end up scrubbing the man page for 5 minutes.

Leave a Comment