Linux VM Guest on Hyper-V Server 2012 R2 - No Gateway RRS feed

  • Question

  • I am running Hyper-V Server 2012 R2 (Server Core) with a CentOS 6.5 derivate as a Linux VM guest OS.  The motherboard has two Intel Ethernet NICs.  In the Hyper-V settings one NIC is setup for the virtual WAN switch and the other for the virtual LAN switch.  Hyper-V is configured for the managment to only be done through the virtual LAN switch.  Thus my Linux VM guest should be the only thing using the WAN switch.  The Hyper-V switches are setup for the Linux VM as Network rather than the older "Legacy Interfaces."

    I have a Motorola SBG6580 cable modem.  By default the cable modem has some built in router functions.  These seemed to be interferring with some traffic I was trying to tunnel between my location and a second location.  In talking with my ISP techs they suggested disabling NAPT in the cable modem.  My understanding is this would allow all traffic to pass through the cable modem to my WAN Ethernet NIC.

    My Linux VM guest is setup to use DHCP for the WAN configuration and it correctly obtains the IP address assigned by my ISP.  But the Linux system seems to retry periodically to obtain a DHCP address.  If I enter an "ifconfig eth0" command I see an IP address, but no gateway and I think the lack of a gateway address is why the Linux VM seems to repetitively try to use DHCP to obtain an IP address?  I don't recall if the netmask showed up in the ifconfig display or not?  But I think only the gateway address was missing?

    Yet if I plug my Windows 8.1 PC into the same cable modem (with NAPT disabled) the PC gets the IP address assigned by my ISP. And an "ipconfig /all" command shows I have a netmask and gateway route.

    I assume that something about using a Hyper-V virtual switch in my Linux VM is causing me trouble? But I don't understand why the Linux VM is able to obtain the IP address from the ISP (using DHCP), but it doesn't seem to obtain the default gateway address?  Shouldn't all that information have been included in the response to the initial DHCP request?

    I've tried searching this forum and the Internet, but haven't run across any solution.  I'm hoping that someone will see this post who can help me fix this problem.



    • Edited by WindOfChange Thursday, February 6, 2014 9:22 PM Correcting Typos
    • Moved by BrianEhMVP Thursday, February 6, 2014 9:56 PM
    Thursday, February 6, 2014 9:18 PM

All replies

  • Hi Theokrat,

    I checked on this with one of our developers and he suggested that you should try using the command "/sbin/ip route show | grep default" to see if gateway details are visible. He believes that ifconfig may not be providing the complete story.

    The other suggestion I want to make is that can you try this with a legacy NIC? If the legacy NIC shows the same behavior then it is likely a Hyper-V problem and I can ask the Hyper-V developers about it.

    Let me know your observations.


    Saturday, February 8, 2014 12:24 AM