LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-06-2008, 04:57 AM   #1
bala.linux
LQ Newbie
 
Registered: Feb 2008
Distribution: Ubuntu, Centos
Posts: 10

Rep: Reputation: 0
Routing : Route an ip differently from its ip range


Hello All,

I need to route my network range 10.40.10.0/255.255.255.0 to 10.8.10.1 except 10.40.10.217. I should leave 10.40.10.217 to its default gateway itself. How can i do this? Please help.

I have the range of ips, is there any way to do this without splitting them. If only splitting is the way, please let me know how to split it in less routing rules.


Thanks and Regards,
Bala
 
Old 05-06-2008, 08:20 AM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 475

Rep: Reputation: 73
I'm sure it is something that can be accomplished with a bit more detail. What is your ultimate goal? Why does 10.40.10.217 need to be its own default gateway? Is this routing for a single host?

Code:
route add -net 10.40.10.0/24 gw 10.8.10.1 dev eth0
route add 10.40.10.217/32 gw 10.40.10.217 dev eth0
(from memory, may not be 100% accurate)

I'm guessing that your system(s) are on a network that can route to 10.8.10.1 and it knows where to send 10.40.10.0/24 traffic...

Without a clearer picture of your network and/or what exactly you are after I'm hoping the information provided is helpful.
 
Old 05-06-2008, 12:20 PM   #3
bala.linux
LQ Newbie
 
Registered: Feb 2008
Distribution: Ubuntu, Centos
Posts: 10

Original Poster
Rep: Reputation: 0
Vpn

Thanks for your reply...

Im basically using a Openvpn server on 10.40.10.217. And, I want to route my local traffic 10.40.10.0/24 to 10.8.10.1 except 10.40.10.217. This routing will be sent on the client side dynamically. So I dont know what interface they use. I need to set default gw as gw for 10.40.10.217. (We cant always say eth0 or 217 itself/it can be public ip also).

Thanks and Regards,
Bala
 
Old 05-07-2008, 07:58 AM   #4
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 475

Rep: Reputation: 73
hmmm... not too familiar with openvpn configuration/routing. I've set it up once in a "test" lab and it's on my To-Do list but I've yet to get to it. I would suspect some magic available in the config(s) that you can define routing and/or call a script.
 
  


Reply

Tags
routing


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
Centos 5.0 routing problem - Route not being honored jeenam Linux - Networking 5 03-08-2008 05:12 AM
FSR: how to configure routing or add route? ihatehotdogs Linux - Networking 3 05-01-2007 09:30 AM
a routing route???? mchitrakar Linux - Networking 4 07-11-2005 11:38 PM
Route add to ban IP range? astroboy5714 Linux - General 0 06-01-2004 04:07 PM
Does ftp have a routing table on where to route users? digital bots Linux - Networking 1 04-06-2004 06:26 PM


All times are GMT -5. The time now is 09:54 AM.

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