Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 subnets and and one suse linux server. The linux has 2 interfaces, eth0 and eth1. I want to configure the suse linux server as a router so that I can make these 2 subnets communicate with each other.

These are my steps:

  1. set the linux eth0 ip as,eth1 ip

  2. add route in linux:

    route add -net netmask dev eth0 
    route add -net netmask dev eth1

  3. set gw as,and gw as

I am not sure if this will work or not? Or is there some step I'm missing?

share|improve this question

You need at least one other step:

echo 1 > /proc/sys/net/ipv4/ip_forward

I don't think you need the explicit route commands above. Simply setting up the two interfaces and allowing forwarding should satisfy your routing requirement.

Check the output of your routing table with:

netstat -rn
share|improve this answer
Agreed, there is no need for the extra routing rules. – David Jun 24 '11 at 2:11

I have not used SuSE in many years but here is a how-to from Novell that should get you up and running if you are using X.

If you are not using X, follow this tutorial (although some files may be in different places on SuSE):

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.