LinuxQuestions.org
Help answer threads with 0 replies.
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 11-13-2006, 04:57 PM   #16
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: 76

Well then it's definitely not iptables blocking the traffic, but it still doesn't seem like it's being forwarded. I'm pretty puzzled at the moment. It must be something blindingly obvious.
 
Old 11-13-2006, 09:16 PM   #17
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
I don't see any ICMP redirects generated from 192.168.22.48 on your capture. This is kind of old, if its suppose to forward a packet out the same interface the request came from it just drops it and sends back an ICMP redirect to the source host.
Why not instead create a static route from host a to network B
from Network A computer

"route -add net 192.168.33.192 netmask 255.255.255.192 192.168.22.209"

and on Network B computer make sure it has a route back to that network

"route -add net 192.168.22.0 netmask 255.255.255.0 192.168.33.193"

This way you don't have to depend on the icmp redirect which a lot of machines will ignore now a days anyway.
 
Old 11-14-2006, 08:44 AM   #18
Cypher12
LQ Newbie
 
Registered: Sep 2006
Location: Toronto, Canada
Distribution: Gentoo, Fedora Core
Posts: 18

Original Poster
Rep: Reputation: 0
Hello,

Thanks for helping out. I guess the main reason why I do not want to place a static route between each computer on Network A to the LinuxBox2, and vice vera for each computer on Network B ... is simply because there are quite a large numper of computers were dealing with here on both subnets.

To be even more honest ... now its just a matter of curiousity (and frustration). Its rather problematic and tedious too ... I know some 3 comm router's which were able to do ICMP redirects ... and I hate to think of Linux as having a limitation (which I'm sure it doesn't) ... I'm sure my Linux boxes can allow these two subnets to communicate .. I just still don't know how.

I will continue to keep the post updated.
Thanks and Take Care

Last edited by Cypher12; 11-14-2006 at 08:46 AM.
 
Old 11-14-2006, 10:07 AM   #19
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
Yeah I would think that the redirect will be making it back. Its just a sign of poor design, if you are ok with that then its all good.
Try clearing your iptables on all the participating hosts. Host A, Router A, Router B, Host B.
iptables -F

and do another tcpdump on Host A.
"tcpdump -i <eth*> -vvv -n -s 1514 icmp"

eth* will be your outgoing interface.

Oh yeah and I am trying to create a redirect scenario with my Linux router, and it does not seem to be sending a redirect ICMP message back either. Maybe something builtin that does not generate it.

Last edited by sal_paradise42; 11-14-2006 at 12:29 PM.
 
Old 11-14-2006, 12:48 PM   #20
Cypher12
LQ Newbie
 
Registered: Sep 2006
Location: Toronto, Canada
Distribution: Gentoo, Fedora Core
Posts: 18

Original Poster
Rep: Reputation: 0
Hello,

I just read your post and flushed iptables for client A, LinuxBox1, LinuxBox2, and client B.

** While perfoming a ping from my Network A computer (IP 192.168.22.230)

*************************************
* From client A (ip: 192.168.22.230)*
*************************************
Code:
prompt# ping 192.168.33.193
PING 192.168.33.193 (192.168.33.193) 56(84) bytes of data.
** No output produced here .. but also note it is not syaing "No route to host" eitheir.

*************************************
* Also from client A (ip: 192.168.22.230)*
*************************************
Code:
prompt# /usr/sbin/tcpdump -i eth0 -vvv -n -s 1514 icmp
13:20:16.206919 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 511, length 64
13:20:17.206959 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 512, length 64
13:20:18.207003 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 513, length 64
** This happens repeatedly .. still no sign of an icmp redirect, nor a echo-reply

**********************************
* Linux Box 1 (ip: 192.168.22.48)*
**********************************
Code:
prompt# /usr/sbin/tcpdump -i eth0 -vvv -n -s 1514 icmp
14:03:49.484485 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 563, length 64
14:03:50.484755 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 564, length 64
14:03:51.485050 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 565, length 64
14:03:52.485326 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 566, length 64
14:03:53.485624 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 192.168.22.230 > 192.168.33.193: ICMP echo request, id 6439, seq 567, length 64

**********************************
* Linux Box 2 (ip: 192.168.22.48)*
**********************************
Code:
prompt# /usr/sbin/tcpdump -i eth0 -vvv -n -s 1514 icmp
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1514 bytes
12:20:16.670938 IP (tos 0xc0, ttl  64, id 20556, offset 0, flags [none], length: 106) 192.168.22.209 > 192.168.22.143: icmp 86: 192.168.22.209 udp port 137 unreachable for IP (tos 0x0, ttl 128, id 42681, offset 0, flags [none], length: 78) 192.168.22.143.137 > 192.168.22.209.137: [udp sum ok]
>>> NBT UDP PACKET(137): QUERY; REQUEST; UNICAST


I don't even know how to read this one ... I'm pinging from 192.168.22.230 to 192.168.33.193 ... its should be going thru the gateway 192.168.22.48. For example:

Code:
     ping             gateway               eth0                  eth1
192.168.22.230 ---> 192.168.22.48 ---> 192.168.22.209 ----->192.168.33.193 

Why do I have a 192.168.22.209 > 192.168.22.143 ... Regardless I guess I can just equate that to other network activity on this network, afterall other people are using it right now.

Thanks again for your time
Take Care

Last edited by Cypher12; 11-14-2006 at 12:50 PM.
 
Old 11-14-2006, 02:34 PM   #21
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
hmm, I just tried this with FreeBSD as the router and it works:

[root@linux ~]# ping 5.5.5.4
PING 5.5.5.4 (5.5.5.4) 56(84) bytes of data.
From 192.168.1.115: icmp_seq=0 Redirect Host(New nexthop: 192.168.1.50)
From 192.168.1.115: icmp_seq=0 Redirect Host(New nexthop: 192.168.1.50)

so it looks like a problem with Linux, I found this it pretty much says that with Iptbles (netfilter) in your kernel icmp redirect does not work. that might be the problem, you should use FreeBSD as your router
 
Old 11-15-2006, 02:14 PM   #22
Cypher12
LQ Newbie
 
Registered: Sep 2006
Location: Toronto, Canada
Distribution: Gentoo, Fedora Core
Posts: 18

Original Poster
Rep: Reputation: 0
Hello,

I am posting this to complete the post .. that is this problem has been solved:

Steps for Solution

** The key here to getting my network to work was simply by properly configuring some config files since I really need those ICMP redirects.

**************************************************************************************************** ****
# /etc/sysctl.conf for GentooBox 1 & 2 -- the machines basically acting as the routers
**************************************************************************************************** ****
Code:
## Enabled Kernel Parameters ##
# Forwarding
   net.ipv4.conf.all.forwarding = 1
# Source Route Verification
    net.ipv4.conf.default.rp_filter = 1
# Reverse Path
    net.ipv4.conf.all.rp_filter = 1
# ICMP Redirect-Acceptance
    net.ipv4.conf.all.accept_redirects = 1
# ICMP Redirect-Sending
    net.ipv4.conf.all.send_redirects = 1
# Secure Redirects
    net.ipv4.conf.all.secure_redirects = 1
**********************************************************
# /etc/sysctl.conf for Client Machines
**********************************************************
Code:
## Enabled Kernel Parameters ##
# Forwarding
   net.ipv4.conf.all.forwarding = 0
# Source Route Verification
    net.ipv4.conf.default.rp_filter = 1
# Reverse Path
    net.ipv4.conf.all.rp_filter = 1
# ICMP Redirect-Acceptance
    net.ipv4.conf.all.accept_redirects = 1
# ICMP Redirect-Sending
    net.ipv4.conf.all.send_redirects = 0
# Secure Redirects
    net.ipv4.conf.all.secure_redirects = 1
To sum it up .. there is a net.ipv4.conf.all.send_redirects kernel parameter that exisits and needed to be enabled (set to 1).. once that was .. I already had the net.ipv4.conf.all.accept_redirects in my /etc/sysctl.conf. Each parameter is pretty straight forward. To summarize ... my two Gentoo Boxes need to be able to generate the redirects ... while equivalently my clients in both Network A and Network B need to accept them when are sent.

Thanks again
Take Care

Last edited by Cypher12; 11-15-2006 at 03:08 PM.
 
Old 11-15-2006, 04:21 PM   #23
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
nice job
 
Old 05-22-2007, 09:13 AM   #24
UhhMaybe
Member
 
Registered: Jul 2004
Location: Salt Lake City, Utah
Distribution: Absolute 12.0 Studio 64 1.3.0
Posts: 470

Rep: Reputation: 30
Cool

Thank you for taking the time to post the solution. It needs to be happening more often here in the forums.

Last edited by UhhMaybe; 05-22-2007 at 09:18 AM.
 
  


Reply

Tags
icmp, redirect, routing



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
persistent static route ANU Linux - Networking 5 04-01-2012 07:23 PM
Shorewall static route problem leiw General 1 11-15-2006 04:48 PM
static route dvong3 Linux - Networking 1 01-25-2006 04:42 PM
Help with static route noinfo Linux - Networking 1 10-05-2005 11:40 AM
static route cox Linux - Networking 3 09-30-2003 02:22 PM

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

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