--- Casey Carter <Casey@Carter.net> schrieb: > Looks like you've broken the routing -- eth1 is receiving packets that > claim eth1 is their source. It would be nice to see the output of "ip > route list table all", and "ip route list table cache" after running the > > test program. > Here we go: Script started on Wed Mar 27 12:59:01 2002 scorpio_1:/home/condat/jpo # ip route flush cache scorpio_1:/home/condat/jpo # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:E0:4C:71:05:92 inet addr:10.1.12.87 Bcast:10.1.12.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:4cff:fe71:592/10 Scope:Link UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1 RX packets:76343 errors:0 dropped:0 overruns:0 frame:0 TX packets:7743 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:7226827 (6.8 Mb) TX bytes:704299 (687.7 Kb) Interrupt:11 Base address:0x5000 eth1 Link encap:Ethernet HWaddr 00:E0:4C:71:05:91 inet addr:10.1.12.151 Bcast:10.1.12.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:4cff:fe71:591/10 Scope:Link UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1 RX packets:554 errors:0 dropped:0 overruns:0 frame:0 TX packets:229 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:57784 (56.4 Kb) TX bytes:37212 (36.3 Kb) Interrupt:10 Base address:0x7000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:664 (664.0 b) TX bytes:664 (664.0 b) sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) scorpio_1:/home/condat/jpo # ./rtt -a 10.1.12.151 -d eth0 scorpio_1:/home/condat/jpo # ip route list table cache local 10.1.12.87 from 10.1.12.88 tos 0x10 dev lo src 10.1.12.87 cache <local> iif eth0 broadcast 10.1.12.255 from 10.1.12.138 dev lo src 10.1.12.87 cache <local,brd> iif eth0 broadcast 10.1.12.255 from 10.1.12.144 dev lo src 10.1.12.87 cache <local,brd> iif eth0 broadcast 10.1.12.255 from 10.1.12.138 dev lo src 10.1.12.87 cache <local,brd> iif eth1 broadcast 10.1.12.255 from 10.1.12.144 dev lo src 10.1.12.87 cache <local,brd> iif eth1 broadcast 10.1.12.255 from 10.1.12.126 dev lo src 10.1.12.87 cache <local,brd> iif eth1 broadcast 10.1.12.255 from 10.1.12.126 dev lo src 10.1.12.87 cache <local,brd> iif eth0 10.1.12.151 from 10.1.12.87 via 10.1.12.1 dev eth0 cache mtu 1500 advmss 1460 10.1.12.151 via 10.1.12.1 dev eth0 src 10.1.12.87 cache mtu 1500 advmss 1460 broadcast 10.1.12.255 from 10.1.12.185 dev lo src 10.1.12.87 cache <local,brd> iif eth1 broadcast 10.1.12.255 from 10.1.12.183 dev lo src 10.1.12.87 cache <local,brd> iif eth1 broadcast 10.1.12.255 from 10.1.12.185 dev lo src 10.1.12.87 cache <local,brd> iif eth0 broadcast 10.1.12.255 from 10.1.12.183 dev lo src 10.1.12.87 cache <local,brd> iif eth0 10.1.12.88 from 10.1.12.87 tos 0x10 via 10.1.12.1 dev eth0 cache mtu 1500 advmss 1460 scorpio_1:/home/condat/jpo # exit Script done on Wed Mar 27 12:59:46 2002 The log contains: Mar 27 12:59:28 scorpio_1 kernel: martian source 10.1.12.151 from 10.1.12.87, on dev eth0 Mar 27 12:59:28 scorpio_1 kernel: ll header: 00:e0:4c:71:05:92:00:d0:03:6a:f7:fd:08:00 Mar 27 12:59:29 scorpio_1 kernel: martian source 10.1.12.151 from 10.1.12.87, on dev eth0 Mar 27 12:59:29 scorpio_1 kernel: ll header: 00:e0:4c:71:05:92:00:d0:03:6a:f7:fd:08:00 Mar 27 12:59:30 scorpio_1 kernel: martian source 10.1.12.151 from 10.1.12.87, on dev eth0 Mar 27 12:59:30 scorpio_1 kernel: ll header: 00:e0:4c:71:05:92:00:d0:03:6a:f7:fd:08:00 Mar 27 12:59:31 scorpio_1 kernel: martian source 10.1.12.151 from 10.1.12.87, on dev eth0 Mar 27 12:59:31 scorpio_1 kernel: ll header: 00:e0:4c:71:05:92:00:d0:03:6a:f7:fd:08:00 Mar 27 12:59:32 scorpio_1 kernel: martian source 10.1.12.151 from 10.1.12.87, on dev eth0 Mar 27 12:59:32 scorpio_1 kernel: ll header: 00:e0:4c:71:05:92:00:d0:03:6a:f7:fd:08:00 "./rtt -a 10.1.12.151 -d eth0" means: send packets to 10.1.12.151 using a socket bound to eth0 (with SO_BINDTODEVICE). Funny, isn't it? BTW, I found a hack to get my program working by making the martians non-martians: iptables -t nat -A POSTROUTING -o eth0 -d 10.1.12.151 -p udp --dport 12345 -j SNAT --to 1.2.3.4 Regards Jörg ===== -- Regards Joerg __________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Ihre E-Mail noch individueller? - http://domains.yahoo.de - : 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