[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

How to route all traffic on XP workstation via adsl except for one IP

I have a number of standalone and networked laptops and workstations that connect to the internet via ADSL or to the local network via a NIC.  I need these devices to also have a USB 3G card connected at the same time, in order to connect to one particular site/IP only.  When I connect the 3G device ALL routing attempts to route through it.   I need to get all traffic routing through its normal device, ie ADSL, LAN or whatever, but routing through to the single site via the USB Modem.    I can add a single route but what do I use to indicate ALL traffic through one device except the particular site/IP.   The USB Modem will always a  static IP but the ADSL connection / NIC will be dynamic
0
PNRT
Asked:
PNRT
  • 4
  • 2
1 Solution
 
solntcevCommented:
Just add static route to this single IP with low metric. All other traffic will go by default gateways.
sorry for my english. not native language.
route ADD [IP] MASK 255.255.255.255 [USB card IP] METRIC 0

Open in new window

0
 
solntcevCommented:
"-p" flag makes route persistent.
route ADD [IP] MASK 255.255.255.255 [USB card IP] METRIC 0 -p

Open in new window

0
 
PNRTAuthor Commented:
Hi Thanks for this.  This was the idea I had but METRIC 0 gives - "Route: Bad Metric Value 0" and any other value leaves the default gateway as the USB device in the routing table, so everything tries to get out by that.   The metric of the NIC is 25.   When the USB is not connected the default gateway is correct at 192.168.1.1.  When the USB device is connected, the default gateway is the IP of the USB device.   Thanks for your help.

0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
solntcevCommented:
You can make USB card route with big metric, than XP will use routel with less metric values
route ADD 0.0.0.0 MASK 0.0.0.0 [USB card IP] METRIC 100 -p

Open in new window

0
 
PNRTAuthor Commented:
Thanks for the replies.  Please confirm that I understand correctly.   Route ADD 0.0.0.0 MASK 0.0.0.0 [USB Device IP] METRIC 100 stops the USB device from acting as the default gateway, but when I added this I could not get to the USB Device Network.  I added a second - route ADD [IP] MASK 255.255.255.255 [USB DEVICE] METRIC 2 which then worked OK.  Is this the best method?  One route to stop the device being the gateway and a secong route to add the devices network?
0
 
solntcevCommented:
Yes, i am not sure about best method, but this method works.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now