I'm in the middle of doing some testing on a mobile device, and want to test it from the network. The mobile device will only connect to networks via WiFi, and doesn't support ad-hoc mode, so I've set up an old WiFi router as an AP, which is connected via ethernet to a port on my laptop. The router operates under 192.168.0.0/24.
My laptop is also connected to our normal network via another ethernet port. This network operates under 10.0.2.0/24, and provides internet connectivity.
My laptop is running a VM which has two NICs, each bridged onto the two respective physical NICs. The 10.0.2.0 network is reachable via eth0, and the 192.168.0.0 network is reachable via eth1.
The problem I'm having is that all connectivity drops as soon as I run ifup eth1
. I've tried changing routing tables and adapter metrics, but have had no luck.
Here's the output from ifconfig -a
:
eth0 Link encap:Ethernet HWaddr 08:00:27:04:7a:b7
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe04:7ab7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18135 errors:0 dropped:0 overruns:0 frame:0
TX packets:11076 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12226743 (12.2 MB) TX bytes:1047606 (1.0 MB)
eth1 Link encap:Ethernet HWaddr 08:00:27:96:cf:1c
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe96:cf1c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1803 errors:0 dropped:0 overruns:0 frame:0
TX packets:1439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:166923 (166.9 KB) TX bytes:118391 (118.3 KB)
Here's my routing table:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth1
0.0.0.0 10.0.2.2 0.0.0.0 UG 100 0 0 eth0
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
And the output from ip route
:
default via 192.168.0.1 dev eth1 metric 100
default via 10.0.2.2 dev eth0 metric 100
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
192.168.0.0/24 dev eth1 proto kernel scope link src 192.168.0.5
Ideas? I'm not a Linux guy, so I'm stumped by this.
Edit:
# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
Output from ip route
after dropping the eth1
default route:
default via 10.0.2.2 dev eth0 metric 100
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
192.168.0.0/24 dev eth1 proto kernel scope link src 192.168.0.5