LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-29-2012, 11:31 AM   #1
genese
Member
 
Registered: Feb 2006
Location: belgium
Distribution: FC5
Posts: 39

Rep: Reputation: 16
[SOLVED]Force routing of packets coming from the same subnet


Hello All,

My setup :

ROUTER : 10.10.10.1/24

HOST-1 : 10.10.10.10/24 default gw : 10.10.10.1

HOST-2 : 10.10.10.20/24 default gw : 10.10.10.1

Don't ask me why (at least before you have solved my problem ;-), I want to make HOST-1 & HOST-2 communicate via ROUTER.

I have added specific routes on each HOST :

HOST-1 : route add 10.10.10.20 via 10.10.10.1

HOST-2 : route add 10.10.10.10 via 10.10.10.1

The problem is that ROUTER replies with ICMP-Redirects.

How do I force ROUTER to route this traffic ?

ROUTER is a "Ubuntu 10.04.3 LTS" box.

TIA for your help

Last edited by genese; 12-29-2012 at 12:32 PM.
 
Old 12-29-2012, 12:12 PM   #2
bijo505
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: Fedora & Ubuntu
Posts: 77

Rep: Reputation: 18
Hi,

As per the ICMP protocol "ICMP Redirect is a mechanism for routers to convey routing information to hosts." I am pasting the content from the wiki below.

"Redirect
Redirect requests data packets be sent on an alternative route. ICMP Redirect is a mechanism for routers to convey routing information to hosts. The message informs a host to update its routing information (to send packets on an alternate route). If a host tries to send data through a router (R1) and R1 sends the data on another router (R2) and a direct path from the host to R2 is available (that is, the host and R2 are on the same Ethernet segment), then R1 will send a redirect message to inform the host that the best route for the destination is via R2. The host should then send packets for the destination directly to R2. The router will still send the original datagram to the intended destination. However, if the datagram contains routing information, this message will not be sent even if a better route is available. RFC1122 states that redirects should only be sent by gateways and should not be sent by Internet hosts."

Source: http://en.wikipedia.org/wiki/Interne...ssage_Protocol
http://www.wildpackets.com/resources...cp_ip/redirect

I hope this will help you
--
Thanks,
Bijo

Last edited by bijo505; 12-29-2012 at 12:24 PM.
 
Old 12-29-2012, 12:31 PM   #3
genese
Member
 
Registered: Feb 2006
Location: belgium
Distribution: FC5
Posts: 39

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by bijo505 View Post
Hi,

The router will still send the original datagram to the intended destination.
Seems to work as advertised ;-) I've been blinded by the redirect messages.

Thank you.
 
  


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
Help regarding routing from one subnet to another pauldg123 Linux - Newbie 1 08-07-2008 04:41 PM
Subnet mask erroneously stopping UDP packets estratos Programming 2 03-07-2007 03:54 AM
routing from one subnet to another NetAX Linux - Networking 2 06-16-2004 09:10 AM
Help with Subnet Routing xatmes Linux - Networking 6 04-27-2004 12:52 AM
forward broadcast packets to another subnet VultureCulture Linux - Networking 9 10-25-2003 05:14 PM


All times are GMT -5. The time now is 02:22 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