Reply to comment

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 192.168.1.25 netmask 255.255.255.0 up

 

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

 

# route add default gw 192.168.1.1 eth0 

 

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

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options