Solved

setting a gateway

Posted on 1998-09-27
1
203 Views
Last Modified: 2013-12-15

We have a dedicated 64kbps link to internet, we want to use linux as a gateway for our LAN.

 The set up i thought is like this.


  ---------      --------       ---------  
    LAN    |====| LINUX  | ==== | ROUTER |
  ---------      --------       ---------  

 I set up two ethernet cards in linux. I want to send packets coming from lan to router. Linux is not sending packets to second interface, How to transfer data between these two  interfaces.
We are using redhat 5.0
thanks
sarma
local lan and other is connected to an other
0
Comment
Question by:sarmaas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 1630904
assuming your NIC connected to LAN has IP 192.168.1.1,
and you NIC connected to ROUTER has IP w.x.y.z1, and
your ROUTER has IP w.x.y.z2, then you need following:

route add -net 192.168.1.0 gw 192.168.1.1
route add -net w.x.y.0 gw w.x.y.z1
route add -net default gw w.x.y.z2


I don't know if redhat has an appropriate config file (/etc ?),
but you should add these commands anywher in the rc startup
scripts.
Also make shure that you kernel has enabled IP_FORWARDING
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question