0

I did configure a static IP for my home wifi connection, but now I wanna add another static IP for using it in another network but I don't know how to do it.

Right now I have the following configuration for my home:

/etc/network/interfaces

iface wlan0 inet static
     address 192.168.100.100
     netmask 255.255.255.0
     network 192.168.100.0
     broadcast 192.168.100.255
     gateway 192.168.100.1

But I want to add for my outside network as this:

iface wlan0 inet static
     address 10.20.15.51
     netmask 255.255.255.0
     network 10.20.15.0
     broadcast 10.20.15.255
     gateway 10.20.15.1

Any suggestion? I am running Raspbian on a Rasbperry Pi

0

You'll need something that is able to take the settings for two networks, optionally prioritize one network over another, see which wireless network you're currently connected to, and apply the right set of IP address settings. Generally, this is the job NetworkManager was designed to do. There are other pieces of software that can do the same thing, too.

Without knowing the name and version of your Linux distribution, it will be hard to offer any more specific advice. The syntax of your configuration file looks like Debian/Ubuntu style, but on them, the configuration file pathname is usually /etc/network/interfaces, not /etc/interfaces. So which distribution is it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.