LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-06-2010, 08:42 PM   #1
wiran03
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Rep: Reputation: 0
Route 2 PC


I have a two card on same machine, I would like to route the PC1 to PC3,.. Please help

I'm using Fedora 9 as my router:

---------------Fedora 9
-------------/---------\
----------Switch 1----Switch 2
-------192.168.26.x--192.168.22.x
---------/-----\------ /-----\
-------PC 1----PC 2---PC 3---PC 4

Thanks ,..
 
Old 12-06-2010, 10:40 PM   #2
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
1. make sure ip forwarding is enabled in your 'Fedora 9' and also do the following:
Code:
# vi /etc/sysctl.conf
	net.ipv4.ip_forward = 0			<--- change to 1
# sysctl -p
# chkconfig iptables on | service iptables start
# iptables -F OUTPUT
# iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE	<--- device attached to switch 2
# iptables --append FORWARD --in-interface eth1 -j ACCEPT	<--- device attached to switch 1
2. run in PC1(if its linux): if your PC1 is a non-linux machine then you should check on how routing is done on that operating system.
Code:
# route add -net 192.168.22.0 netmask 255.255.255.0 gw <ip_address_of_Fedora_9>

note: the route command given in step 2 is only temporary and will not be present upon next reboot. You will have to find out yourself how to make it permanent. This commands worked in my instance and may need some modifications to work on others.

Last edited by chickenjoy; 12-06-2010 at 10:42 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iproute2 (ip route), pppoe and default route lorddoskias Linux - Networking 0 05-09-2007 11:04 AM
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 04:59 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration