Where are my packets? Was: Unusual routing setup

From: Joerg Pommnitz (pommnitz@yahoo.com)
Date: Thu Mar 21 2002 - 10:34:53 EST


Hi List,
I decided to try SO_BINDTODEVICE for my test program. You can find it
attached to this mail.

Here is the situation:
jpo>ifconfig -a
ppp0 Link encap:Point-Point Protocol
          inet addr:193.254.165.18 P-t-P:10.64.64.64
Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
          RX packets:1985 errors:5 dropped:0 overruns:0 frame:0
          TX packets:1141 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:122841 (119.9 kb) TX bytes:92926 (90.7 kb)

ppp1 Link encap:Point-Point Protocol
          inet addr:193.254.167.86 P-t-P:10.64.64.65
Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
          RX packets:75 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1149 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:4564 (4.4 kb) TX bytes:43626 (42.6 kb)

jpo>netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
172.20.0.203 0.0.0.0 255.255.255.255 UH 40 0 0
eth0
10.1.12.0 0.0.0.0 255.255.255.0 U 40 0 0
eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 40 0 0
ppp1
0.0.0.0 10.1.12.1 0.0.0.0 UG 40 0 0
eth0

jpo>./rtt -a 193.254.165.18 -d ppp1
jpo>./tcpdump -i ppp1 udp
tcpdump: listening on ppp1
15:29:46.120000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:47.120000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:48.120000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:49.120000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:50.120000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:51.120000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:52.120000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
jpo>./tcpdump -i ppp0 udp
tcpdump: listening on ppp0
15:29:46.100000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:47.600000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:48.080000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:49.560000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:50.100000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:51.600000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:52.090000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)
15:29:53.560000 193.254.167.86.1029 > 193.254.165.18.12345: udp 8 (DF)

So I see the packets going leaving from ppp1 and arriving on ppp0, but
I do NOT see them in my little program.

Does anybody know where and why they get lost?

Note that this program works fine without binding to a device:

jpo>./rtt -a 193.254.165.18
rtt (0:189)
rtt (0:228)
rtt (0:148)
rtt (0:161)

So I'm a little bit lost. Any ideas?

Regards
  Jörg

--- Joerg Pommnitz <pommnitz@yahoo.com> wrote:
> Hi List,
> I want to do something slightly unusual and need a little push in the
> right direction. I have a Linux box (2.4.18) with two GPRS devices
> attached as ppp0 and ppp1. ppp0 has address A, ppp1 has address B. I
> want
> to route traffic to address B (e.g. ppp1) through interface ppp0, e.g
> despite the fact that address B is local I want to sent it through the
> external net. My first naive try was to
> route add -host "address B" ppp0
>
> This does not do what I want. Traceroute still shows that address B is
> just a single hop and 1 ms away.
>
> How can I get Linux to do what I want (e.g. not to optimize the
> routing).
>
> Regards
> Jörg
>
> P.S.: Just in case you are wondering: This is to make some round trip
> measurements.

=====

-- 
Regards
       Joerg

__________________________________________________ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/



- To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Sat Mar 23 2002 - 22:00:01 EST