[Disclaimer : wicked networking inside]


tortoise underscore 74 at yahoo. nospam co.uk a écrit :
> [...] My test system dials out from one modem and responds on
> the other. The problem is
> that though a connection is established it is not used for any traffic.
> I have ppp0 as and ppp1 as If I ssh into
> the OS is smart enough to realise that
> might as well be so the connection is not actually used.

No, the OS is not smart, and is not at all. is just a local IP address, and a locally generated packet
sent to any local address is routed via lo, the loopback interface,
regardless of the interface the local address is attached to.

> Is there any way to
> resolve this using some clever routing commands?

Depending on what you want to test, you may try using some NAT to fool
the kernel routing. Make up a couple of dummy IP addresses that you will
use on the PPP link, for instance :

ppp0 dummy :
ppp1 dummy :

Do *not* use them as IP aliases (ppp0:1), else they will be considered
local and routed via lo. Create routes for these addresses as if they
were remote destinations :

route add dev ppp1
route add dev ppp0

Replace the source address of packets going out via ppp0 and ppp1 with
the dummy address :

iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to
iptables -t nat -A POSTROUTING -o ppp1 -j SNAT --to

And replace the dummy destination address of packets coming in via ppp0
and ppp1 with the real address :

iptables -t nat -A PREROUTING -i ppp0 -j DNAT --to
iptables -t nat -A PREROUTING -i ppp1 -j DNAT --to

Test scenario :
Send a ping packet to the dummy address
The packet is routed through ppp0 with address, as
The packet source is changed into by the ppp0 SNAT rule.
The packet becomes {src=,dst=}, goes through
the PPP link and arrives at ppp1.
The packet destination is changed into by the ppp1 DNAT
rule. The packet is now {src=,dst=}.
The destination is local, so the packet is routed to the local host
which can send a reply packet to routed via ppp1, through
the PPP link and received on ppp0.