Networking Forums

Networking Forums > Computer Networking > Linux Networking > routing traffic between two modems connected to the same PC.

Reply
Thread Tools Display Modes

routing traffic between two modems connected to the same PC.

 
 
tortoise underscore 74 at yahoo. nospam co.uk
Guest
Posts: n/a

 
      12-20-2006, 03:49 PM

Hi,
I am trying to test an application that uses a modem connection. I
have a telephone line simulator
and two modems. 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 111.111.111.1 and ppp1 as 111.111.112.2. If I ssh into
111.111.111.1 the OS is smart enough to realise that 111.111.111.1
might as well be 127.0.0.1 so the connection is not actually used. I've
tried everything I can think of but nothing works. Is there any way to
resolve this using some clever routing commands? The configuration is
trivial if a second machine is used but is it really necessary? It
would also be less than ideal for automated testing with a script.
Regards,

Bruce.

 
Reply With Quote
 
 
 
 
tortoise underscore 74 at yahoo. nospam co.uk
Guest
Posts: n/a

 
      12-28-2006, 03:31 PM

I'm stll no nearer an answer. Any networking guru's back from christmas
yet?

tortoise underscore 74 at yahoo. nospam co.uk wrote:
> Hi,
> I am trying to test an application that uses a modem connection. I
> have a telephone line simulator
> and two modems. 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 111.111.111.1 and ppp1 as 111.111.112.2. If I ssh into
> 111.111.111.1 the OS is smart enough to realise that 111.111.111.1
> might as well be 127.0.0.1 so the connection is not actually used. I've
> tried everything I can think of but nothing works. Is there any way to
> resolve this using some clever routing commands? The configuration is
> trivial if a second machine is used but is it really necessary? It
> would also be less than ideal for automated testing with a script.
> Regards,
>
> Bruce.


 
Reply With Quote
 
tortoise underscore 74 at yahoo. nospam co.uk
Guest
Posts: n/a

 
      01-02-2007, 09:12 AM

tortoise underscore 74 at yahoo. nospam co.uk wrote:
> Hi,
> I am trying to test an application that uses a modem connection. I
> have a telephone line simulator
> and two modems. 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 111.111.111.1 and ppp1 as 111.111.112.2. If I ssh into
> 111.111.111.1 the OS is smart enough to realise that 111.111.111.1
> might as well be 127.0.0.1 so the connection is not actually used. I've
> tried everything I can think of but nothing works. Is there any way to
> resolve this using some clever routing commands? The configuration is
> trivial if a second machine is used but is it really necessary? It
> would also be less than ideal for automated testing with a script.
> Regards,
>
> Bruce.


Any networking gurus back from new year's yet?

 
Reply With Quote
 
linux konqueror in progress
Guest
Posts: n/a

 
      01-03-2007, 11:50 PM
How about using vmware server then install other operating system on
this virtual computer.
Then on one screen /one machine you gonna have two operating systems
with independent IP addressees.Running same time of course.

rest is easy.

just hook em up.

David
Linux conqueror in progress.

 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      01-04-2007, 08:02 PM
[Disclaimer : wicked networking inside]

Hello,

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 111.111.111.1 and ppp1 as 111.111.112.2. If I ssh into
> 111.111.111.1 the OS is smart enough to realise that 111.111.111.1
> might as well be 127.0.0.1 so the connection is not actually used.


No, the OS is not smart, and 111.111.111.1 is not 127.0.0.1 at all.
111.111.111.1 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 : 111.111.112.1
ppp1 dummy : 111.111.112.2

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 111.111.112.1 dev ppp1
route add 111.111.112.2 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 111.111.112.1
iptables -t nat -A POSTROUTING -o ppp1 -j SNAT --to 111.111.112.2

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 111.111.111.1
iptables -t nat -A PREROUTING -i ppp1 -j DNAT --to 111.111.111.2

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connected to free public network - but no traffic Alpha Wireless Networks 2 11-11-2008 04:56 PM
Win2003 R2 server just stops routing traffic until I restart Routing service Martijn Tonies Windows Networking 8 11-03-2008 11:05 AM
VPN Client at XP Connected to WinSvr 2003 RRAS but no traffic NVVN Windows Networking 6 10-29-2008 10:25 AM
Routing Traffic Julian Windows Networking 3 01-11-2008 09:27 PM
Can cable modems be connected directly to a network switch igniteyourlife@optushome.com.au Windows Networking 3 04-22-2007 05:54 AM



1 2 3 4 5 6 7 8 9 10 11