My Hyper-V host has two physical NICs; I've been running my VMs on one of them successfully for quite some time now.
I now have attached a NAS device to the second NIC. I followed the tip provided by longneck here, but unfortunately the NIC speed in the NAS steps down to the lowest common denominator—the older 10/100 switch that connects the host with the workstations.
So I've opted for #1 in his second tip, here. As anticipated, this enables me to connect to the NAS from the VM. However, the NAS can't connect to the Internet to receive OS updates, send email, etc.
At first I thought it might be due to multiple default gateways on the host, so I fixed that:
I also tried configuring a NAT network, as discussed here, and setting the gateway of NIC 2 to 192.168.3.1. But that requires multiple gateways on the host, so I probably shouldn't have expected it to work in any case. (And, since only a single NAT network is supported on a host, I had to temporarily remove my Docker NAT, a configuration I wouldn't have been pleased with.)
These are the NICs on the PDC VM:
The NAS can connect to the PDC VM and receive an IP configuration from DHCP:
I can ping the NAS from the host, as well as from the PDC VM:
192.168.2.1
is the LAN interface for our SOHO NAT router. I suspect this problem may have something to do with that—it's possible that the 192.168.3.0/24
subnet can't connect to the gateway for the 192.168.2.0/24
subnet.
Is this solved with something called 'routing?'
--EDIT--
I don't understand routing, although I did find a bit of an explanation here.
So I entered this command:
route ADD 192.168.3.0 MASK 255.255.255.0 192.168.2.1 IF 19
Here're the results:
C:\Users\Admin>route print /4
===========================================================================
Interface List
3...00 15 5d ea 3d 97 ......Hyper-V Virtual Ethernet Adapter #3
19...54 9f 35 00 84 c0 ......Hyper-V Virtual Ethernet Adapter #2
9...54 9f 35 00 84 be ......Hyper-V Virtual Ethernet Adapter
1...........................Software Loopback Interface 1
11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
7...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
35...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.2.1 192.168.2.11 36
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
172.17.48.0 255.255.240.0 On-link 172.17.48.1 271
172.17.48.1 255.255.255.255 On-link 172.17.48.1 271
172.17.63.255 255.255.255.255 On-link 172.17.48.1 271
192.168.2.0 255.255.255.0 On-link 192.168.2.11 291
192.168.2.11 255.255.255.255 On-link 192.168.2.11 291
192.168.2.255 255.255.255.255 On-link 192.168.2.11 291
192.168.3.11 255.255.255.255 On-link 192.168.3.11 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.2.11 291
224.0.0.0 240.0.0.0 On-link 172.17.48.1 271
224.0.0.0 240.0.0.0 On-link 192.168.3.11 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.2.11 291
255.255.255.255 255.255.255.255 On-link 172.17.48.1 271
255.255.255.255 255.255.255.255 On-link 192.168.3.11 281
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 192.168.2.1 1
===========================================================================
C:\Users\Admin>route ADD 192.168.3.0 MASK 255.255.255.0 192.168.2.1 IF 19
OK!
C:\Users\Admin>route print /4
===========================================================================
Interface List
3...00 15 5d ea 3d 97 ......Hyper-V Virtual Ethernet Adapter #3
19...54 9f 35 00 84 c0 ......Hyper-V Virtual Ethernet Adapter #2
9...54 9f 35 00 84 be ......Hyper-V Virtual Ethernet Adapter
1...........................Software Loopback Interface 1
11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
7...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
35...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.2.1 192.168.2.11 36
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
172.17.48.0 255.255.240.0 On-link 172.17.48.1 271
172.17.48.1 255.255.255.255 On-link 172.17.48.1 271
172.17.63.255 255.255.255.255 On-link 172.17.48.1 271
192.168.2.0 255.255.255.0 On-link 192.168.2.11 291
192.168.2.11 255.255.255.255 On-link 192.168.2.11 291
192.168.2.255 255.255.255.255 On-link 192.168.2.11 291
192.168.3.0 255.255.255.0 192.168.2.1 192.168.3.11 26
192.168.3.11 255.255.255.255 On-link 192.168.3.11 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.2.11 291
224.0.0.0 240.0.0.0 On-link 172.17.48.1 271
224.0.0.0 240.0.0.0 On-link 192.168.3.11 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.2.11 291
255.255.255.255 255.255.255.255 On-link 172.17.48.1 271
255.255.255.255 255.255.255.255 On-link 192.168.3.11 281
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 192.168.2.1 1
===========================================================================
C:\Users\Admin>
But... still no success. My NAS still can't connect to the Internet.
--EDIT #2--
I should explain better what I mean when I say that the NAS 'steps down' to 10/100.
When I configure the cabling to include the Gb switch, as suggested by longneck
here, the admin interface for the NAS reports bandwidth of 10/100. However, when I run a cable from the physical NIC on the Hyper-V host directly to the NIC on the NAS, the NAS reports Gb speeds:
(I'm not onsite, so I'm presently unable to reroute the cables to get a screen shot of the slower report.)
Also, note in the image above the reported speed of the disconnected eth1
— 1Gbps. When the Gb switch is in place and I swap the cable from eth0
to eth1
, the disconnected eth0
then shows 1Gpbs and the connected eth1
shows 10/100. I can only surmise that this has something to do with the slower 10/100 switch to which the 1Gpbs switch is connected via a separate cable.
I need Gb speeds on the NAS, so apparently this can't be done with cabling. For the meantime I've opted for his suggested software configuration; thus the 1Gpbs report above. (But under this configuration the NAS can't connect to the Internet, as described earlier.)
Here's the model 1Gpbs switch I'm using:
0 Answers