Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have situation and could really use some assistance ... allow me to elaborate:
My computer on "Network A" has to communicate to other computers on Network B. It does this through "Linux Box 1" which has a static route to "Linux Box2" which in turn has a direct connection (via eth1) to "Network B" .... its a lot easier if I just draw a diagram:
Mask Values:
Network A : 255.255.255.0
Network B: 255.255.255.192
Code:
Internet <-----------> "LinuxBox1"
[WAN] |[192.168.22.48]
|
|[192.168.22.230](gw 192.168.22.48)
|<----------"Network A computer"
|
|[192.168.22.209]
"LinuxBox2"
[192.168.33.193]|
|
|[192.168.33.194]
<-----------"Network B computer'
*****************************************
To make things simple my Network A computer has its gateway set to "LinuxBox1" and as you have probably guessed, my "Network A" computers are not able to communicate (ie: ping) to my Network B computers. Does anybody have a clue as to what may be my problem?? ... really I am at the early "brain-storming" stage .. so any ideas may help. I just don't want to have to manually set a static route on each computer in "Network A" to the "LinuxBox2" (I mean I really don't think thats the most practical solution). I was told to look up a "sysctrl.conf" file ... I don't know what that file governs ... don't even know if thats the right course of action, but I will investigate it in the mean time.
it all generally looks fine, i'd make your first port of call a mission to run tcpdump or wireshark on both routers and try to ping from A to B and see what you see.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
What's the default gateway on a Network B machine?
Have you tested Network B machines to make sure they can actually reach the Internet? Can you try to tracepath to www.google.com or something else on the Internet from a Network B machine?
It does not make sense that machines on Network B would be able to route packets to the Internet and back through LB1, but LB1 would not be able to ping those machines, unless LB2 is NAT'ing the traffic from eth1 out eth0, or if LB2 has another connection that is allowing packets back from the Internet to bypass LB1.
In this attempt I wil attempt to communicate from Network A computer (IP 192.168.22.230 gw 192.168.22.48) to the LinuxBox2's 33 network card:
From Network A computer (192.168.22.230):
Code:
pompt# ping 192.168.33.193
PING 192.168.33.193 (192.168.33.193) 56(84) bytes of data.
*Remember, LinuxBox1 (192.168.22.48) is the gateway for this computer (192.168.22.230).
**Also, you will note: that a "no route to host" warning is NOT
genrated .. which I think is somewhat significant here.
******************************************************************* tcpdump output of LinuxBox1 (while ping 192.168.33.193 from Network A computer 192.168.22.230)
*******************************************************************
Code:
prompt# /usr/sbin/tcpdump -i eth1 | grep echo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 68 bytes
14:25:07.129610 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 597, length 64
14:25:08.129887 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 598, length 64
14:25:09.130165 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 599, length 64
14:25:09.307669 IP ndssrv48 > 192.168.22.223: ICMP echo request, id 22372, seq 1, length 64
14:25:09.307894 IP 192.168.22.223 > ndssrv48: ICMP echo reply, id 22372, seq 1, length 64
14:25:10.130482 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 600, length 64
14:25:11.130729 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 601, length 64
14:25:12.131022 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 602, length 64
14:25:13.131299 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 603, length 64
14:25:14.131575 IP 192.168.22.230 > 192.168.33.193: ICMP echo request, id 8533, seq 604, length 64
*I dont' know why there was an echo-request/echo-reply sent to 223, though they both reisde on tNetwork A, still it is anotherr computer on Network A (192.168.22.230) that is doing the pinging.
**I added the grep for echo, to keep things cleaner ... hope that is okay??
******************************************************************* tcpdump output of LinuxBox2 BOTH interfaces (while ping 192.168.33.193 from Network A computer 192.168.22.230)
*******************************************************************
Code:
/usr/sbin/tcpdump -i eth0 | grep echo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 68 bytes
******************************
Code:
/usr/sbin/tcpdump -i eth1 | grep echo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 68 bytes
**************************************
So it seems as though the echo-request are not getting re-directed over from LinuxBox1 to LinuxBox2.
Thanks again and I apologize for the long post
Take Care
No a computer on NetworkB cannot reach the internet .. however a computer on Network B can ping LinuxBox1 which has a direct connection to the internet, so I don't know how that can be explained??
So to clarify, A computer on Network A:
Quote:
1. Can ping LinuxBox1 (192.168.22.48)
2. Can access the internet
2. Can ping the 192.168.22.209 interface in LinuxBox2
3. Cannot ping the 192.168.33.193 inteface on LinuxBox2
A computer on Network B:
Quote:
1. Can ping Linux Box 1 (192.168.22.48)
2. Cannot access the internet
3. Can ping the 192.168.22.209 interface on LinuxBox2
4. Can ping the 192.168.33.193 interface on LinuxBox2
********************************************************
Additionally, performing a tracepath to google.com produces (after a short delay):
**ALSO: I think what I am looking for is a functioanlity called ICMP redirect if anybody has heard of this, specifically how I need to get it enable into my system, that would probably be the key to this puzzle.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Seems like LB2 is filtering out some ICMP traffic. Looking at your iptables it's a bit confusing to tell which rule is taking precedent.
Code:
ACCEPT icmp -- anywhere anywhere icmp echo-reply
DROP icmp -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state RELATED,ESTABLISHED
DROP udp -- anywhere anywhere state NEW
DROP tcp -- anywhere anywhere state NEW
DROP all -- anywhere anywhere
Is iptables first-match, or last-match? I'm not sure. If it's first-match it seems that you're dropping all ICMP that isn't an echo-reply (which would rule out ttl-exceeded I believe), and if it's last-match it would be dropping everything (!?!) from the last rule: DROP all -- anywhere anywhere. So either way I think most ICMP is being dropped, other than replies (but if the request never makes it in, how could a reply go out?).
I think the problem is on LB2. Is there any chance you could iptables -F all on LB2 and see if that temporarily removes the problem? Try the same tests after iptables -F all and see if they work. Note that it will flush all the iptables rules that you currently have loaded.
******************************************
So still no communication between the two subnets. I know that in cisco routers there is a icmp redirect feature, whereby in my scenario, LinuxBox1, would inform (since it has the static route to the .33 network) any Network A computer to direct packages destined for the .33 network to LinuxBox2.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.