Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Assigning two different iface's to two subnets

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
VolkHe
Posts: 2
Joined: 2015-09-05 01:25

Assigning two different iface's to two subnets

#1 Post by VolkHe »

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

Post Reply