Setting up a Static IP and route in Linux

By Paulus, 17 April, 2011

The first step is to setup the interface with an IP and a netmask:

# ifconfig eht0 netmask up

Next we need to tell where we want to route the information to:

# route add default gw eth0 

The above command is saying that we want a default gateway on interface eth0 to be which is a router.