Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

routing with Linux RedHat 6.0

Status
Not open for further replies.

wgarciap

IS-IT--Management
Dec 21, 2000
12
CA
I would like to setup a Linux Box (Ver. 6.0) as a router, but...
I have two NICs installed and each one has a IP address pointing its own subnet...
NICs
eth0 - 192.168.101.230
eth1 - 192.168.103.1
Subnets
Subnet1 - 192.168.101.0
Subnet2 - 192.168.103.0

I played with some routes and ip_forwarding, but still doesn't work.

Any ideas...Maybe I am wrong with my route table...
 
I do think you have to add the routes and IP's to your ethernet card(s).
Try typing :
ifconfig eth0 127.0.0.1 (127.0.0.1 being the IP to add)
then you need to add a route:

route add -host 127.0.0.1 dev eth0 (configure this and ifconfig using whatever Eth interface; eth0,eth1, etc)

Hope this helps!

Rninja
 
also, if you go into linuxconf and look at the network setup, there is a check box in one of the areas ( I think that it might be gateway) where you can enable routing. You must check this. Mise Le Meas,

Mighty :)
 
Your problem is that boxes on either subnet cannot talk to each other? Or that boxes on the same subnet cannot talk?
The former would mean that you either have not enabled ip_
forwarding( echo 1 > /proc/sys/net/ipv4/ip_forward in my
distro) or that you do not have your routing configured correctly.

If you don't want to mess with static routes between the
two subnets or a default gw assignment is not working, then you should maybe jut run routed.

The second means that you have a bad netmask most probably.

Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top