MKS wrote:
Hello list
I have a scenario the a computer has 2 PPP connections, where the
computer is the ppp client.
$ifconfig
ppp0 inet 10.0.0.1 p-t-p 192.168.1.1 mask 255.255.255.255
ppp1 inet 10.0.1.1 p-t-p 192.168.1.1 mask 255.255.255.255
for testing purpuses I want packets from ppp0 to ppp1 to actually go
over the physical connection
e.g.
ping 10.0.0.1 -I ppp1 should send the packet over the ppp1 (and out
underlyging physical interface eth0) and it should arrive on the ppp0
interface. (routing is taken care of at the ppp server)
The -I flag only changes the source address of the packets, not the
routing. And as the packet is destined for the machine itself, it goes
over the loopback interface. Maybe adding the -r flag does what you
want, but I doubt it.
Hping2 probably can do this:
-I --interface interface name
By default on linux and BSD systems hping2 uses default
routing
interface. In other systems or when there is no default
route
hping2 uses the first non-loopback interface. However
you are
able to force hping2 to use the interface you need
using this
option. Note: you don't need to specify the whole
name, for
example -I et will match eth0 ethernet0 myet1 et cetera.
If no
interfaces match hping2 will try to use lo.
HTH,
M4