I've got a Raspberry Pi running Raspbian (wheezy). I'm working on it to have three network connections ... the ethernet connection and two wireless connections from usb dongles.
So far, I set it up so that any one of them works correctly. Any two of them will act like they're configuring, but if I "ifdown" the primary connection, I'm off the network.
What I want to happen is that all three are connected, and I'm able to bring down any two of them and the other still functions. These may or may not be on the same network (in the end, I'm going to be using just the wireless networks, but will need the ethernet network for initial configuration).
Currently, when I do a networking restart, I get:
SIOCDELRT: No such process
But it appears to configure.
The bigger problem is that when I do an "ifdown eth0", I'm still on the network (I can ping other boxes on the network), but my gateway appears to be gone (I can't ping google.com or 8.8.8.8) ... I get "Network is unreachable". I also get that same error when I execute the ifdown command. So it's finding something it doesn't like. messages doesn't have any information, though.
I've tried this with both dchp and static IP's, so I'm not quite sure what I'm messing up here. I thought dhcp would at least work.
Here's my interfaces file:
Code:
auto lo
iface lo inet loopback
######################
### LAN config
######################
auto eth0
# if using DCHP
#iface eth0 inet dhcp
# if using static IP
iface eth0 inet static
address 192.168.1.50
post-up route add default gw 192.168.1.1 metric 1
post-down route del default gw 192.168.1.1 metric 1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 192.168.1.1 8.8.8.8
######################
### Wireless config
######################
auto wlan0
# If using DHCP
#iface wlan0 inet dhcp
# If using static IP
iface wlan0 inet static
address 192.168.1.51
post-up route add default gw 192.168.1.1 metric 2
post-down route del default gw 192.168.1.1 metric 2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 192.168.1.1 8.8.8.8
# wpa and wpa2
wpa-ssid Firefly
wpa-psk <my key>
#auto wlan1
# If using DHCP
#iface wlan1 inet dhcp
# If using static IP
iface wlan1 inet static
address 192.168.1.52
post-up route add default gw 192.168.1.1 metric 3
post-down route del default gw 192.168.1.1 metric 3
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 192.168.1.1 8.8.8.8
# wpa and wpa2
wpa-ssid Serenity
wpa-psk <my key>
Here's my ifconfig when both eth0 and wlan0 are up (I haven't done it with all three yet because 1) I have problems with just two and 2) I need one of the usb slots for my keyboard while I'm messing with the network ... hard to ssh in with no network).
Code:
eth0 Link encap:Ethernet HWaddr b8:27:eb:d4:00:99
inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3545 errors:0 dropped:25 overruns:0 frame:0
TX packets:597 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:409262 (399.6 KiB) TX bytes:55618 (54.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:54 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5376 (5.2 KiB) TX bytes:5376 (5.2 KiB)
wlan0 Link encap:Ethernet HWaddr c8:3a:35:cb:19:4b
inet addr:192.168.1.51 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2355 errors:0 dropped:0 overruns:0 frame:0
TX packets:398 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:347234 (339.0 KiB) TX bytes:48394 (47.2 KiB)
And my hosts file
Code:
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
192.168.1.50 raspberrypi
192.168.1.51 raspberrypi
192.168.1.52 raspberrypi
Any idea what I'm missing?