LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-29-2012, 10:31 AM   #1
genese
Member
 
Registered: Feb 2006
Location: belgium
Posts: 76

Rep: Reputation: 20
[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 11:32 AM.
 
Old 12-29-2012, 11:12 AM   #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 11:24 AM.
 
Old 12-29-2012, 11:31 AM   #3
genese
Member
 
Registered: Feb 2006
Location: belgium
Posts: 76

Original Poster
Rep: Reputation: 20
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



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

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

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