473,796 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1886
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.co m

<jg****@gmail.c omwrote in message
news:11******** **************@ y66g2000hsf.goo glegroups.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.c omwrote in message
news:11******** **************@ y66g2000hsf.goo glegroups.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.c omha scritto nel messaggio
news:11******** **************@ y66g2000hsf.goo glegroups.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
4814
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. How can i register for the event ? And what event is that ? Any smaple code ??? thanks Shiv.
7
7990
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 archives of this forum) that apparently allows you to do exactly that. <img src="whateveryourfilelocationis" style="position:absolute; left:Xpx; top:Xpx"> What do you call this command? The responder of the particular message where I found it...
1
1877
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, ideally it should be done with one button press, ie create the report and then email it to the first person on the routing slip. Tom
2
5002
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 where I can find basics on how to write routing algorithms. It will be great. I have tried to search alot on google but can't find any good links. There are lot of links that talk about the theory aspects of routing algorithms. But I am looking...
1
3394
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 src ip, dst ip, src port, dst port. Should I run this program as a Daemon? If so, how do I do that? I would appreciate your response.
0
2403
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 performing the routing operation....only some mentioned nodes have to perform routing.....is it possible to disable some nodes ????
0
1267
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 advanced route planning and optimization features into their existing software product. Be it in Logistics, Field Service or Sales Force Planning ISVs are encouraged to contact DNA at http://www.dna-evolutions.com/vrinitiative.html
0
1181
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 advanced route planning and optimization features into their existing software product. Be it in Logistics, Field Service or Sales Force Planning ISVs are encouraged to contact DNA here to obtain a free Developer Express License including email...
0
3279
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 example. When i run this i am getting invalid argument with sendmsg, with error number 22. Could any one please help me out with this. #include <sys/types.h> #include <netinet/in.h> #include <netinet/ip6.h> #include <errno.h> #include <string.h>
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10242
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.