RE: two or more networks, gateways, VLANs, etc....
I have wifi at work, however it has a pretty strict firewall, blocking things like Gmail's IMAP ports. I can tether through my iPhone 5 using USB, however I lose access to my work printer and other intranet sites by doing so. I was wondering what would happen if I had my phone tethered through USB and also connected to my work wifi at the same time. Is it possible to have my macbook use both connections, or switch back and forth on the fly depending on what I'm doing?
Hi smurray,
Yes, I believe you can have your machine attached at the same time through different interfaces...the only trouble that might arise is how you configure the IP addresses for the different LANs or VLANs. This isn't really a problem, just that you have to be careful that the networks "don't step on each other toes", so to speak. Or , alternatively, they could be extensions of the same network and then you have to make sure the IP addresses don't step on each other. When properly setup, this works fine. Any so-called "gateway" does precisely this type of routing. In many unixes, this routing is handled by the kernel itself in order to be fast.
The way this works is if you reference an IP on one LAN (or the Internet), then your gateway knows which LAN to send the packets out on. This is done through the routing tables. So, for example, say you wish to print to a network printer, then you send the print job to the LAN IP address of the network printer and the connection is made on the printer's LAN through your wireless interface. If, on the other hand, you reference an Internet IP address, then the connection is made through your iPhone tether. As a user, you wouldn't know the difference; it would just work. As the administrator, you would have to set up the different networks and routing tables correctly. (By the way, any router also does this.)
Regards,
Switon
P.S. I still run a Linux box with two ethernet cards in it and the Linux box acts as the gateway appropriately routing packets to the proper LAN.