+ Post New Thread
Results 1 to 14 of 14
Wireless Networks Thread, How feasible is this? in Technical; Our internet connection via the LEA isn't reliable, despite their best efforts. Disruptions to the connection are frequent and I ...
  1. #1

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    24

    How feasible is this?

    Our internet connection via the LEA isn't reliable, despite their best efforts. Disruptions to the connection are frequent and I need a solution. I'm halfway there already, but the current method is inconvenient.

    I have an Android phone with tethering built in. I can plug the phone into the machine via USB and connect to the internet, but I have to disable the NIC to do so (the web browsers continue to try and use the LEA connection if I don't) which is a bit annoying and leads to obvious problems.

    Is there a way to force internet traffic through the tethered connection if it's present? I'm full up with a cold at the moment so I'm probably missing something pretty obvious.

    Any suggestions appreciated.

  2. #2

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,510
    Thank Post
    513
    Thanked 2,392 Times in 1,854 Posts
    Blog Entries
    24
    Rep Power
    820
    Only way I can think of is by altering your routing tables with static routing. Making Sense of Windows Routing Tables

    You could script that, so that you just have to run a script when you tether, and then when normal connection is up, run another one to set it back to normal.

  3. Thanks to localzuk from:

    fafster (4th January 2010)

  4. #3
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0
    you want to run the network internet through your phone! thats a lot of traffic for one little phone, your LEA must be awfull to even consider doing that

  5. #4


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,618
    Thank Post
    275
    Thanked 777 Times in 604 Posts
    Rep Power
    223
    Quote Originally Posted by fafster View Post
    Our internet connection via the LEA isn't reliable, despite their best efforts. Disruptions to the connection are frequent and I need a solution.

    Any suggestions appreciated.
    Assuming all of the above (and the subsequent dissatisfaction) has been clearly stated to them, get them to agree to a backup business ADSL line - it might be in breach of your contract with them, so make sure they agree to this as a backup solution.

    You'll probably need to engage the big guns to push this through, so brief them appropriately before you let them trundle across the deck and crush any opposition against the poop deck.

  6. #5

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    24
    Quote Originally Posted by tommccann View Post
    you want to run the network internet through your phone! thats a lot of traffic for one little phone, your LEA must be awfull to even consider doing that
    Haha, not for everyone, only me!

    I don't want Top Gear interrupted because the ISA server's playing up!

  7. #6

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    24
    Quote Originally Posted by localzuk View Post
    Only way I can think of is by altering your routing tables with static routing. Making Sense of Windows Routing Tables

    You could script that, so that you just have to run a script when you tether, and then when normal connection is up, run another one to set it back to normal.
    Ah-ha! I've set up the command, I just need to work on how to run it when the phone is tethered.

  8. #7

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,510
    Thank Post
    513
    Thanked 2,392 Times in 1,854 Posts
    Blog Entries
    24
    Rep Power
    820
    Quote Originally Posted by fafster View Post
    Ah-ha! I've set up the command, I just need to work on how to run it when the phone is tethered.
    That is an interesting question. Only way I can think of would be a service which checks WMI for network connections, which you'd then compare with the connection that you know it should be called (or the number of connections if the number of connections normally remains static).

    On windows PowerShell,
    Code:
    get-wmiobject win32_networkadapter | select-object name
    would return the device names, and you can run a powershell script as a service using srvany.

    http://www.vistax64.com/powershell/3...s-service.html
    http://support.microsoft.com/kb/137890
    Last edited by localzuk; 4th January 2010 at 03:27 PM.

  9. #8

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,984
    Thank Post
    850
    Thanked 2,650 Times in 2,250 Posts
    Blog Entries
    9
    Rep Power
    763
    As another option you should be able to do this realitivly easily by using VBScript and a WMI event sink. It is just a script that you would set to run on startup that will just wait in the background until you plug the phone in. It will see the phones adapter show up and then run your required commands.

    Quote Originally Posted by srochford View Post
    another alternative is to use WMI. This can set up somethng called an event sink which sits there waiting for an event to happen. When it does, you carry out a particular action.

    The attached script will do just that. run it (best to use wscript because otherwise you'll see a window on screen) and it will sit in the background waiting.

    When a USB stick is inserted, the sink event will trigger. I wrote this for something else (question here about how to check for "bad" files on a USB stick) but it's easy to adapt. Basically, when the USB device arrives it gets given a DEVICEID; this is used to find out more info about the drive including its name (not C: etc but things like harddisk0). This is then queried using WMI to get a list of partitions (USB sticks often have more than one partition)

    finally, the routine CheckFolder is called once for each partition - it's called with the drive letter and a backslash - eg G:\

    In that routine you could add something like:

    Code:
    Set oShell=createobject("wscript.shell")
    sCmd="robocopy " & sFolder & " c:\backup /s /e"
    oShell.run sCmd,7,true
    This will copy the contents of the partition to c:\backup - you can obviously put it where you want!
    http://www.edugeek.net/forums/attach...skarrival2.txt

    You will need to find the adapter name or ID of the phone and modify the script a bit ie. with the event sync set to look for new adapters as above in localcuk's post but it is quite doable.
    Last edited by SYNACK; 4th January 2010 at 05:36 PM.

  10. Thanks to SYNACK from:

    fafster (7th January 2010)

  11. #9

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    24
    Cheers for the replies all. When I get a bit of time I'm going to automate it, but at the moment I'll make do with my batch file which turns the route on or off, depending on which argument you pass it.

  12. #10

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,630
    Thank Post
    890
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    441
    Also have you tried reordering the priority of your network connections in windows?

  13. Thanks to ZeroHour from:

    SYNACK (7th January 2010)

  14. #11

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,984
    Thank Post
    850
    Thanked 2,650 Times in 2,250 Posts
    Blog Entries
    9
    Rep Power
    763
    Quote Originally Posted by ZeroHour View Post
    Also have you tried reordering the priority of your network connections in windows?
    Nicely caught ZH, we had all got caught up in the initial suggestion and had forgotten the easiest and most elegant solution

    Change Network adapter priority in Vista | Windows Reference
    Change Network adapter priority in XP/2000 | Windows Reference

  15. Thanks to SYNACK from:

    ZeroHour (7th January 2010)

  16. #12

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    24
    Unfortunately it doesn't work. The routing table, once set up when the machine is switched on, won't replace the ISA server with the phone as the default gateway. It still needs to be scripted or changed manually.

  17. #13

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,630
    Thank Post
    890
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    441
    Quote Originally Posted by fafster View Post
    Unfortunately it doesn't work. The routing table, once set up when the machine is switched on, won't replace the ISA server with the phone as the default gateway. It still needs to be scripted or changed manually.
    So I take it you have the tethered network connection as the top priority?

  18. #14

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    24
    Quote Originally Posted by ZeroHour View Post
    So I take it you have the tethered network connection as the top priority?
    Yep, I checked and it was top by default. Then it was the ethernet connection, and then the virtualbox adapter.

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •