473,326 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Dictate Packet Routing

Background:

My program connects to an external web service. Normally this is done
over a high speed lan connection, but in the event that the lan is
down, it supports using 1 or many dial up connections to connect to
the web as well. As a side note, the machine is on a network, so the
lan will always appear to be up, it is the backbone to the external
world that could go down. My program uses the Ping class to determine
if we currently have an available connection, if so it uses it, if
not, it goes through a list of dial up connections and attempts to
dial them. if a dial up connection is successful it will hold onto
that connection for 3 minutes of inactivity before disconnecting.

Problem:

Lets say I have a 5 minute long series of processes. When the first
process executes the lan is down, so we connect to the dial up
connection, process the request, and everything is fine. Next, the lan
comes back up within the 3 minutes time out, so we now effectively
have two live connections to the web. So now I get the second request,
is there any way programatically I can force the packets to route over
the lan and not the dial up? (I know there are outside ways to do this
with metrics, I am looking for code).

Any help would be appreciated.

Thanks,

Mar 21 '07 #1
3 1869
I'm curious, why not just disconnect from the dial up connection if you
determine the lan connection is working? If you can dial up to it, surely
you can hang up.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<jg****@gmail.comwrote in message
news:11**********************@y66g2000hsf.googlegr oups.com...
Background:

My program connects to an external web service. Normally this is done
over a high speed lan connection, but in the event that the lan is
down, it supports using 1 or many dial up connections to connect to
the web as well. As a side note, the machine is on a network, so the
lan will always appear to be up, it is the backbone to the external
world that could go down. My program uses the Ping class to determine
if we currently have an available connection, if so it uses it, if
not, it goes through a list of dial up connections and attempts to
dial them. if a dial up connection is successful it will hold onto
that connection for 3 minutes of inactivity before disconnecting.

Problem:

Lets say I have a 5 minute long series of processes. When the first
process executes the lan is down, so we connect to the dial up
connection, process the request, and everything is fine. Next, the lan
comes back up within the 3 minutes time out, so we now effectively
have two live connections to the web. So now I get the second request,
is there any way programatically I can force the packets to route over
the lan and not the dial up? (I know there are outside ways to do this
with metrics, I am looking for code).

Any help would be appreciated.

Thanks,

Mar 21 '07 #2
Hi,

<jg****@gmail.comwrote in message
news:11**********************@y66g2000hsf.googlegr oups.com...
Background:
Lets say I have a 5 minute long series of processes. When the first
process executes the lan is down, so we connect to the dial up
connection, process the request, and everything is fine. Next, the lan
comes back up within the 3 minutes time out, so we now effectively
have two live connections to the web. So now I get the second request,
is there any way programatically I can force the packets to route over
the lan and not the dial up? (I know there are outside ways to do this
with metrics, I am looking for code).
I do not think so, the routing is performed in a lower layer then the one
you have access to.

Question, how do you detect that the lan is down?
As well as how do you know that the lan is back on?
Mar 21 '07 #3
Launch a command shell that executes "route change" to change the default gw
(0.0.0.0).
Tricky.

<jg****@gmail.comha scritto nel messaggio
news:11**********************@y66g2000hsf.googlegr oups.com...
Background:

My program connects to an external web service. Normally this is done
over a high speed lan connection, but in the event that the lan is
down, it supports using 1 or many dial up connections to connect to
the web as well. As a side note, the machine is on a network, so the
lan will always appear to be up, it is the backbone to the external
world that could go down. My program uses the Ping class to determine
if we currently have an available connection, if so it uses it, if
not, it goes through a list of dial up connections and attempts to
dial them. if a dial up connection is successful it will hold onto
that connection for 3 minutes of inactivity before disconnecting.

Problem:

Lets say I have a 5 minute long series of processes. When the first
process executes the lan is down, so we connect to the dial up
connection, process the request, and everything is fine. Next, the lan
comes back up within the 3 minutes time out, so we now effectively
have two live connections to the web. So now I get the second request,
is there any way programatically I can force the packets to route over
the lan and not the dial up? (I know there are outside ways to do this
with metrics, I am looking for code).

Any help would be appreciated.

Thanks,

Mar 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Shiv Agarwal | last post by:
Hi, I am writing a .NET application in C#. I have to display the routing table in some formatted NMS way. Anyhow the issue is that, whenever the routing table changes I want to get an event....
7
by: Doc | last post by:
I've read in a couple of different places including the archives of this forum that html doesn't allow you to precisely dictate the position of an image, but I found this command (again in the...
1
by: Tom Weston | last post by:
Help I have created a report in access and wish to use a routing slip to email it to my line management, how can I do that? I have searched the web but not found a way to add a routing slip,...
2
by: ricky | last post by:
Hi, I am student and I am doing a final year project on Zig-bee. I have to write low energy routing algorithms. I need to write routing algorithm for LEACH. If anybody can help with some links...
1
by: sangith | last post by:
Hi, I tried the packet capture module program. I did a file transfer using ftp from this host to another server. But when I ran the program, it was just hanging off and it did not print the...
0
by: devidevi | last post by:
hello sir, i'm doing a project in Mobile Adhoc network in ns2 simulator i have to perform routing with AODV.. my problem is i have to disable certain nodes ( in a 20 node topology) from...
0
by: vince | last post by:
Until December, 31st, 2008 companies may obtain a free Developer License of the JOpt.NET Vehicle Routing Library The Vehicle Routing Initiative aims on software vendors that plan to incorporate...
0
by: vince | last post by:
Until December, 31st, 2008 companies may obtain a free Developer License of the JOpt.SDK Vehicle Routing Library The Vehicle Routing Initiative aims on software vendors that plan to incorporate...
0
by: shekharban | last post by:
Hi, Below is the raw socket program for sending routing header in ipv6 domain. My source address is fe80::21d:9ff:fe17:58c7 and destination address is fe80::21d:9ff:fe17:5d0e in the below...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.