Assigning two different iface's to two subnets

Kernels & Hardware, configuring network, installing services

Assigning two different iface's to two subnets

Postby VolkHe » 2015-09-05 01:28

Hi, I am running Raspbian, on my Raspberry Pi I have plugged in a Ethernet cable : eth0 and a Wifi Usb Dongle : wlan0

I have my etc/network/interfaces file configured like so

Code: Select all
auto lo

iface lo inet loopback

iface eth0 inet dhcp

iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        gateway 192.168.1.1

allow-hotplug wlan0

iface wlan0 inet static
        address 192.168.2.200
        netmask 255.255.255.0

iface default inet dhcp


When trying to connect with SSH to address 192.168.1.100, I get a connection, when trying with address 192.168.2.200, SSH returns Network Error: Connection timed out.

Also receive no response when trying to ping 192.168.2.200 from a windows machine

If however Iadjust the wlan0 block in etc/network/interfaces to the following

Code: Select all
iface wlan0 inet static
        address 192.168.1.200
        netmask 255.255.255.0


I am able to connect to wlan0 in SSH to address 192.168.1.200, and I also receive requests when ping 192.168.1.200 from a windows machine.

How can I use a different subnet for my wlan0 iface
VolkHe
 
Posts: 2
Joined: 2015-09-05 01:25

Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable