Using multiple IP addresses at once
Ever needed to configure a network-based device using a web interface, but found that its default IP address doesn't match the setup of your network? e.g. Your new device uses 192.168.1.* and you use 192.168.0.* ? Here's an easy way to fix it: set up your machine to talk to both subnets at once. Here's a little screencast to show how it's done on the Mac.
Comments
Hi Dan -
On Linux, you set up extra ‘aliases’ for the interface, called things like
eth0:0,eth0:1etc. And, yes, you can have lots of them. You can add them in /etc/network/interfaces, but to do it temporarily on the command line needs something like:and then
when you’ve finished.
Or, if you prefer the new ‘ip’ commands:
In many ways this is a lot like VLANs - there’s no problem in running multiple subnets at the same time on the same underlying network, be it wired or wireless. But the thing you need to remember is that nothing will forward packets between those subnets, or to the outside world, unless you take steps to make them do so.
So, for example, you can’t just add your 192.168.0.1 router as the way for things on the 192.168.1.* network to reach the outside world, because they don’t know how to talk to even that address, nor will it know how to talk back to them.
But this trick was very useful for me recently when someone had installed a device out of reach above a customer’s ceiling without setting its network correctly…
Q
Mark - it's tricky to say without knowing more about your network, but the solution I outlined only works if the machines are all basically on the same open network, and just happen to have been configured with different IP addresses and subnets. If, say, you have two different subnets on two different VLANs, it's more like having them on separate ethernets, and it won't work unless there's something doing routing between them.
When you connect in through the VPN, you're on the 192.168.0.x network, and I don't think you can do anything on the client end to change that, unless the VPN Router is explicitly configured to allow access to 192.168.1.x as well.
Best, Quentin