Setting up a Static IP and route in Linux

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.