One computer, two Internet connections (no cups)

We have two broadband connections in the house.

I’d love to have easy, continuous access from my PC (a Win7 box). Right now, that PC uses the motherboard’s LAN and is connected to the primary Internet connection.

I’d like to keep using that connection and add a network card to connect a virtual machine guest (Virtualbox running Ubuntu) to the Internet via the second connection. That is, the motherboard-bound LAN would connect to the cable modem, and the card-bound LAN would connect to the DSL modem (it’s a bit more complicated than that; both connections go through a router and a series of A/B boxes). The ultimate goal is that when I ping or surf via the host OS, I’d be doing so via the cable connection; when I ping or surf via the guest I’d be doing so via the DSL connection. I wouldn’t have to intervene at all to manually switch connections when I wanted to.

Is this something worth looking into, or will it take a higher level of configuration than is worth it (a very low level)?

Bonus question: can I also put a fax/modem card in there to receive the five incoming faxes we receive per year?

Wouldn’t using a broadband router be more cost-effective? Is there a reason that you need two full broadband connections at home? Are you using so much bandwidth that one or both of the boxes needs a full, dedicated broadband connection? Also remember with some broadband connections you are sharing the connection with the neighborhood so you don’t always have the same bandwidth available to you.

I concur with Robert that this is one of those “what exactly are you trying to accomplish? Because there’s probably a better way to do it” questions.

Off-hand, I’d say the cheapest solution would be to run the “guest” VMWare OS on entirely different hardware-- i.e. buy a $300 netbook and run your software there.

I’m not familiar enough with VMWare to know whether you can instruct it to “reserve” a particular network interface, and deny that interface’s use to the host OS. I’m guessing not, but I could be wrong.

Back in my network support days, I would’ve called what you’re trying to build a bridge, but I don’t think that’s what you’re actually trying to accomplish.

In the VM configuration, go to your virtual NIC and set it to bridged mode. Select the secondary ethernet interface as your bridge interface. Then it should “just work”. Configure the VM as you would any normal machine connecting via the DSL.

You ought to be able to then disable the interface on the Windows side as well, I believe.

Heh, first draft of the OP started getting into the ‘why’, but I figured no one would be interested and would tl;dr the question. Sorry for the paucity of detail.

In short, we work out of our home and a stable, always-up Internet connection is imperative. Our primary connection is excellent, and outages are rare. Rarer still are times when the Internet is down * and *we’re working against a deadline. But when it does happen, the cost of missing a deadline could be many times the added cost of the second (DSL) connection. In other words, the $400 a year it costs us is worth it in terms of peace of mind and saved accounts.

As it is, both lines come in to a pair of A/B switches. When either connection fails, it’s a simple matter of turning the switches to the right place to switch everything over to one or the other connection. When things are restored, things get switched back to their regular settings.

The only thing on the DSL line is the VOIP phone and a nominally headless XP box. If I need to do anything on the DSL line, I have to start the XP box and switch my keyboard/mouse/monitor over to it (the monitor has multiple inputs; I have a USB switch to handle the keyboard/mouse). Once it boots up, I can ping to see if things are down or access the DLS modem to check/change settings.

It too is a rare occurrence, but a $30 NIC would be worth it (if for anything I can repurpose the XP hardware). Plus, the only way we really know if there’s a problem and our phones are down is if we can’t make a call out or voicemails start showing up when we don’t hear the phone ring. That’s a far from effective method.

So since I’ve gotten in the habit of surfing on the VM machine, any time it acts wonky I’d know right away that there was a problem on the DSL line—and could look into fixing it without any further hassle.

I thought ‘bridged’ mode and the like were for using both connections at the same time. I’m hoping to be in the situation where if the DSL line goes down, the VM box won’t have any Internet access at all (unless I reconfigure it).

Yes, this should be doable. As goldmund said, it’s a matter of bridging the VM’s virtual nic to the specific physical nic that you want.

I don’t know VirtualBox specifically, but it’s probably just a matter of changing the bridged network to use the DSL nic instead of the cable nic. So if it’s a windows host, you will have (e.g.) Local Area Connection (–> cable) and then Local Area Connection 2 (–> dsl). Then somewhere in the virtualbox settings you pick Local Area Connection 2 for the bridged network. That should be all there is to it.

VirtualBox will definitely allow you to bridge to a specific connection. With the VM shut down, you need to set the VM settings to allow bridged networking. Here’s some reading in advance:

I don’t have VirtualBox on this machine, but the Network Settings option for a VM should look something like this:

Somewhere in the wide world of Linux there’s router programs that will do what you want, for free. They act as a firewall and NAT router for multiple connections to multiple networks. Higher end routers (like business models from Sonicwall, Watchguard, and top end like Cisco) will also do the same thing. However, you’re starting at around $300 not $30.

You likely will want to do NAT (address translation from internal) and DHCP, if you have multiple network devices.

You define multiple wide area connections, and the second WAN becomes either the fail-over or you can do load-balancing. Fail-over is what it sounds like - if the first connection goes down, the second connection is the altenate route. Load balancing - alternates traffic over first one, then the other WAN connection.

It depends on the algorithm used to load-balance. Some use source MAC address, which means your PC will always use one router, but another PC in the house will use the other route. Not terribly useful unless you are one of these geeks with half a dozen PC’s, maybe one is a really busy server.

The other downside to load-balancing with an internal virtual machine as router - you will need 3 network interfaces, not two, if you want to provide internal ethernet to other PC’s in the house; 2 WAN and 1 LAN connection. If all your house PC’s are actually virtual PC’s in that 1 box - LAN i/f not necessary.

As for faxes - you can attach the fax modem to any fax-receiving program you want, and as long as it is running when the fax comes in you will get your fax. The trick is to not have the damn thing pick up the phone on you all the time if you are slow to answer.

(I knew a fellow who had an odd-looking phone box, that would answer and provide a ring tone to the caller at the right frequency to trigger the fax handshake. For humans, it would sound like the phone was still ringing. Faxes would start replying and the call would be diverted to the fax unit. Unless you receive a lot of faxes, that’s overkill for over a hundred dollars)

So things were sinking in when I realize I had a USB wireless adapter sitting on a bookshelf. I found its software, installed it, and configured the DSL’s wireless access point.

Win7 Host Network and sharing Center now shows three items:
[ul][li]** DLS_Phone**, home network, Access type Internet, HomeGroup Joined. (This is the new wireless network I just set up). [/li][li] ** Network**, home network, Access type Internet, HomeGroup joined. Connections: Gigalinksys. (This is the original wired connection to the cable Internet connection/router). [/li][li] Unidentified Network, public network, Access type: no network access, connections VirtualBox Host-Only Network.[/ul] [/li]
I went to the VirtualBox settings and changed “attached to NAT” to “Attached to Bridged Adapter.” Under I switched the adapter name to the USB Wireless Lan Card and accepted the rest of the defaults.

From the Windows 7 Host machine, I can send my browser to either router’s setup screen. That is, 192.16**.1.1** takes me to the original, wired, cable Internet connection, and 192.16**.2.1** takes the browser to the DSL router. I can also ping both. Ipconfig shows both connections.

From the Linux virtual guest machine, I can only send my browser to the DSL router. It times out at the original, cable router. Ifconfig shows just the DSL router’s IP address. * However*, it seems that I can ping both. Any idea why?

So. How do I limit how much the host sees and can be seen by the USB wireless adapter without cutting off the guest? How does the host know which router to send/receive packets over? If one connection goes down, does this mean it will still have a connection? What about security? Any steps I should be taking (the router is set to WAP2 and there are no neighbours within a hundred yards or so at least)?

Similarly, can I be sure that the guest only uses the DSL connection? One reason for doing this is that if its connection goes down, I’ll know it right away and reset the router/call tech support. Or despite getting ping responses from …1.1, is that how it is now?
On preview, I should reiterate and stress the security question. Part of the reason for the VM is to increase browsing security. Not Fort Knox, but I’d like to make it as hard as possible for a compromised Ubuntu system to get to the main network–which isn’t attached to the DSL router.

Further, could leaving the host wirelessly connected to the DSL router cause any problems? I can’t think of any, but then again, I’m know very little about wireless.

Last second idea: would it make sense to go into the DSL wireless configuration and set up MAC filtering to accept only the Linux MAC?