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
 
Search this Thread
Old 12-23-2012, 04:04 AM   #1
AsgAnquietas
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Rep: Reputation: 0
Exclamation Wierd Advanced Routing Problem


Hello,

I have an advanced routing problem here.
I need the advice of a Networking Expert or a CCNA/CCNP level administrator.

The problem can be found here:
http://hosted.infosky.ro/interesting.png

I have changed the IP addresses to simplify the output.

As you've noticed, I have 2 networks: 192.168.0.0/24 and 192.168.1.0/24 linked to the Router.
192.168.0.0 - is an Ethernet Network.
192.168.1.0 - is a Wireless Network.

My Laptop is running Ubuntu Linux and my router is running Gentoo Linux.

I have connected the Laptop to BOTH the 192.168.0.0 net (via eth0) and to 192.168.1.0 net (via eth2).

So my routing table looks like this:
Code:
default via 192.168.0.1 dev eth0  proto static 
169.254.0.0/16 dev eth0  scope link  metric 1000 
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.2  metric 1 
192.168.1.0/24 dev eth2  proto kernel  scope link  src 192.168.1.2  metric 9
The PROBLEM: When I ping the Wireless Interface of the Laptop (192.168.1.2) from the Computer (192.168.0.3) the ping DOESN'T WORK !
It travels the network up to my Wireless NIC on the Laptop but it dies there !

But if I ping the Router Interface for the WLAN (192.168.1.1) from the same machine (192.168.0.3) it works !

Pinging everything else from Laptop also works !

Being connected to 2 networks on my laptop via my physical interfaces, I have at least 2 directly connected routes.
So it's not a routing problem from what I have seen.

If I remain only on wireless and disconnect Ethernet, everything works fine.
The problem only arises when I'm using BOTH the connections at the same time.

I wiresharked my laptop on all interfaces and filtered for ICMP, and when I ping from the Computer to the Wireless Interface of my Laptop I see that the PINGs are indeed coming into my wireless interface !
But my OS does not send replies.
Only ICMP requests, no replies.

Theoretically it should receive PING on wlan interface and send it out on the ethernet interface (since my ethernet network is directly connected trough eht0). - as indicated by my Red directions in the drawing.

So it's a "ping trough one interface, reply trough other" scenario.

Before you ask, my Router is already set to ip_forward=1, beucase my laptop can sense the pings coming on the wlan interface.

Please, only reply if you understand what I am saying here, please do not "BUMP" or other stuff.
I need serious help here.

Thank you !
 
Old 12-23-2012, 05:37 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
Two possibilities:

1. The router NATs the packet from the desktop computer, leaving you with a hairpin NAT scenario. Wireshark should be able to tell you if this is the case.

2. The packet is caught by the laptop's ingress filtering ("Source Address Verification"), as the source address matches a network connected to a different interface. Try disabling this feature with echo 0> /proc/sys/net/ipv4/conf/default/rp_filter and see what happens.

(By the way, this is by no means an advanced routing problem.)
 
Old 12-24-2012, 03:24 AM   #3
AsgAnquietas
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Exclamation

1. No, it's not a NAT problem.
NAT is enabled only when leaving the Router.
The Ethernet LAN and WLAN are local to the Router.

2. I've echo`ed Zero and still no luck...
 
Old 12-24-2012, 05:15 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by AsgAnquietas View Post
I've echo`ed Zero and still no luck...
Have you tried altering the rp_filter settings for the respective interfaces? (/proc/sys/net/ipv4/conf/eth0/rp_filter for eth0)
 
Old 12-24-2012, 06:15 AM   #5
AsgAnquietas
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Exclamation

I've set all to 0 but it still doesn't work.
 
Old 12-24-2012, 11:19 AM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
Well, can you ping in the other direction (from the laptop to the desktop) if you force the source interface/address with the -I parameter? (ping -I eth2 192.168.0.2)
 
Old 12-26-2012, 02:44 PM   #7
AsgAnquietas
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Exclamation

Destination Host Unreacheable
 
Old 12-27-2012, 07:43 AM   #8
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
Strange, perhaps the -I parameter doesn't work the same way as the -s parameter to traceroute. Could you try traceroute -s 192.168.1.2 192.168.0.3 from the laptop?
 
Old 12-27-2012, 05:27 PM   #9
AsgAnquietas
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
No replies. Only *.
 
Old 12-27-2012, 05:39 PM   #10
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
It this isn't caused by the rp_filter setting, it has to be a firewall issue on the laptop.
 
Old 12-28-2012, 11:27 AM   #11
AsgAnquietas
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
all ICMP is enabled on the firewall.
I don't think it's a firewall issue, since Wireshark tells me that the system receives the ICMP Request, by my system doesn't send out the ICMP Reply...
 
Old 12-28-2012, 11:47 AM   #12
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by AsgAnquietas View Post
all ICMP is enabled on the firewall.
I don't think it's a firewall issue, since Wireshark tells me that the system receives the ICMP Request, by my system doesn't send out the ICMP Reply...
A packet (ICMP or otherwise) received on interface X with a source address belonging to a network connected to interface Y is usually a spoofed packet. The rp_filter setting will cause the system to discard any such packets, but it is also common to have firewall rules dropping spoofed packets.

In addition to disabling rp_filter, you may want to temporarily disable the firewall with iptables -P INPUT ACCEPT and iptables -F INPUT. You may want to check the OUTPUT chain as well, just in case.
 
  


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
[SOLVED] Advanced routing problem yozapho Linux - Networking 5 08-05-2011 02:04 PM
Cannot connect with PPTP, wierd routing problem ?! kfir_w Linux - Networking 0 06-11-2007 01:03 AM
Advanced Routing Problem sirrus_linux Linux - Networking 6 09-22-2004 05:41 AM
Wierd routing problem in Mandrake 10 blixblix Linux - Networking 3 03-26-2004 03:33 PM
Advanced Routing bakerv3 Linux - Networking 3 01-24-2003 06:54 AM


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

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 Google+: linuxquestions
Open Source Consulting | Domain Registration