LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-15-2003, 06:03 AM   #1
suvajit
LQ Newbie
 
Registered: May 2003
Posts: 9

Rep: Reputation: 0
Static Routing in Linux


Hi All ,
I have one more question ...

I have three Nic cards (eth0,eth1,eth2) in my linux box and I am using this box as a Router.

Eth0 -->192.168.150.1 /24 for 192.168.150.XXX subnet ..
Eth1 -->192.168.151.1 /24 for 192.168.151.XXX subnet ..
Eth2 -->192.168.152.1 /24 for 192.168.152.XXX subnet ..

How do I enable static routing so that computer in other subment can communicate with other subnets .

execting an speedly reply from you ....


Thanks in Advance,
Suvajit .....
 
Old 05-15-2003, 06:16 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
You shouldn't need to do anything as the routes for each subnet will be setup automatically when you add the interface. If you want to forward packets between the interfaces then you'll need to run
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
cheers

Jamie...
 
Old 05-15-2003, 06:40 AM   #3
suvajit
LQ Newbie
 
Registered: May 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Hi
Can you pls let me know what all the paramiter or ( syntex ) in ip_forward file?

- Suvajit
 
Old 05-15-2003, 06:43 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
it isn't a file, there is not format, it's just a method of setting a value in the kernel to 1 or 0 (on or off)
 
Old 05-16-2003, 02:54 AM   #5
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Just to expand kewpie's comments - the command I posted originally is literally what you need to run. This won't control any aspect of what packets get sent where, or which interface will accept which packets, or any kind of firewallling. It simply means that if a packet attrives at your linux box that is destined for another machine it will forward it out whichever interface its routing table indicates it should use.

cheers

Jamie...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Static Routing in Slackware 10.0 using Linksys kosmonaft Linux - Networking 16 03-26-2005 03:36 PM
Static Routing Troubles Rundi Linux - Networking 2 07-16-2004 11:38 AM
Routing with multiple static IP's? RedLance Linux - Networking 3 11-02-2003 04:37 AM
Static Routing =!= uplink? jpbarto Linux - Networking 12 10-02-2003 11:30 AM
Static Ip's and Routing Sarcha Linux - Networking 5 02-28-2003 08:19 AM


All times are GMT -5. The time now is 03:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration