Two default gateway, different metric RRS feed

  • Question

  • Hi:

    I've started a virtual machine which has two nics with qemu-kvm on server, one nic with qemu-kvm param "-redir tcp:40037::3389" is in "user" mode which IP is, so if I connect to, it will map to, the other is in bridge mode which IP is, my pc is, In the vm, "route print" shows two default gateway as below:    5    5

    When I use my pc connect to, always cat not connect, so I change the metric value to 100 of, it works well.I am confusing. My question is:

    I capture packet on nic, when connect, the src IP  is, src mac is the mac of, all these are right, but when reply, why it still select default gateway of I mean the dst is and there is a route item like:            on-link    261

    why doesn't it choose this one?

    Or it doesn't find routing table at all when reply, just according to the receive interface? But if really this, why doesn't it work when metric value are the same? 

    Or it doesn't find routing table at all when reply, just according to the src mac, then find arp cache of two interfaces? But when I delete arp cache, it still works well...

    Any help will be appriciated

    Thanks & Regards

    • Edited by GanderGoose Wednesday, December 28, 2016 5:16 AM
    Tuesday, December 27, 2016 9:54 AM

All replies

  • Hi,

    We could try to open a CMD window and run ipconfig /flushdns and check if it helps.

    Have you tried resetting TCP/IP then setting again your IP settings? If not, please try it.


    In addition, this article may help you, please refer to the link:

    The Default Gateway may have been set to on a Windows Vista-based or later OS running Apple’s Bonjour service


    Best Regards,


    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 28, 2016 8:54 AM
  • Hi,thank you for your reply.

    But my question is why receive from interface which IP is, reply still select this interface?. I mean the dst IP is when reply , why doesn't it choose the route item            on-link    261

    and select the other interface which IP is

    The screenshot of Wireshark is 

    • Edited by GanderGoose Monday, January 9, 2017 7:14 AM
    Thursday, December 29, 2016 2:04 AM