Configuring network manually using IP commands

Sun, 08/26/2012 - 19:36 -- jamie

Sometimes, it's usefull to congifure your network device directly, without editing a file like /etc/network/interfaces.

You can review the IP addresses currently available with:

ip addr show

You can also see the routes currently available with:

ip route show

You can remove an address using the following command:

ip addr del LINE-YOU-WANT-TO-DELETE

You can remove a route with:

ip route del LINE-YOU-WANT-TO-DELETE

Try removing all your existing addresses (except the one called lo) and existing routes.

Now, add them back with the IP set of commands.

You might use commands like the following:

ip addr add 192.168.69.76/24 dev eth0

ip route add default via 192.168.69.1 dev eth0