Configuring Your Routing

Whereas with ifconfig and route, you use separate commands to configure the network and routing, you can use the ip command to configure both addresses and routes.

To configure routing, you need to edit the route object. You first add the default route to the Linux system:

bible:~ # ip route add default via

As you can see, this command is very similar to the way you set the default route using the route command with the exception of specifying the gw portion (which is now via).

You can view the routing information with the command ip route show: bible:~ # ip route show dev eth0 proto kernel scope link src dev lo scope link default via dev eth0

The iproute suite of applications is now in mainstream use and its operation set is very large and well defined. Take a look at the ip man page for more information about what you can do with the ip command.

Was this article helpful?

0 0

Post a comment