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
 
LinkBack Search this Thread
Old 10-10-2004, 12:03 PM   #1
kanwar_rajan
Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora Core 6 x64 , Bluewhite64
Posts: 32

Rep: Reputation: 15
Routing on Linux


hey i have a linux machine with 2 nics

i want to setup the box as a gateway for my network ( static router )

i dont want to do NAT , just a simple gateway

how do i do it on linux

i found a software zebra to implement but its quite advanced as it includes various routing protocols .
cant i do simple static routing on linux

if yes, please tell me how ?

thanx in advance
 
Old 10-10-2004, 12:55 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
All you have to do is enable IP forwarding, then it will forward any packets that are directed to it from one directly attached network to another network that it knows about (including the default route). If you wish to add routes to the kernel, either use the route command or the ip command. Note that route and ip are completely different and you have to pick which one you want to use and stick to it. Read their respective man pages to see what the difference is.
 
Old 10-11-2004, 05:55 AM   #3
rabeea
Member
 
Registered: Aug 2004
Location: Pakistan
Posts: 52

Rep: Reputation: 15
hi,
To enable ip forwarding just enter this

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

rest u have to enter routes using ip and route command
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing In Linux bil_nil Linux - Networking 1 10-01-2005 08:25 PM
Linux Routing jhar Linux - Networking 1 04-27-2005 12:09 PM
linux routing on lan bruj3w Linux - Networking 8 03-11-2004 01:21 PM
RH Linux and routing Hybrid Blue Linux - Networking 1 10-01-2003 09:07 AM
Routing with Linux? yes or no? davebarnes Linux - Networking 9 10-23-2002 12:01 PM


All times are GMT -5. The time now is 06:37 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
Open Source Consulting | Domain Registration