-->
  • Recent Articles

    Guest to HOST OR HOST to HOST communication do not happen in KVM macvtap Interface Type


    ISSUE:
    1. As we are using macvtap for direct physical network access, it is defined behavior of macvtap that intra guest or guest to host communication does not happen. Due to the way in which the host's physical Ethernet is attached to the macvtap bridge, traffic into that bridge from the guests that is forwarded to the physical interface cannot be bounced back up to the host's IP stack. Additionally, traffic from the host's  IP stack that is sent to the physical interface cannot be bounced back up to the macvtap bridge for forwarding to the guests.

    Resolution:
    To solve the issue i've created an isolated network and by using that the host and guests can communicate. For all other communicationthey will use primary macvtap network.

    1. create /tmp/isolated.xml file.
    <network>
      <name>isolated</name>
      <ip address='192.168.254.1' netmask='255.255.255.0'>
        <dhcp>
          <range start='192.168.254.2' end='192.168.254.254' />
        </dhcp>
      </ip>
    </network>

    2. Create the network with this command: virsh net-define /tmp/isolated.xml
    3. Set the network to autostart with the virsh net-autostart isolated command.
    4. Start the network.

    [root@example /]# vi /tmp/isolated.xml
    [root@example /]# virsh net-define /tmp/isolated.xml
    Network isolated defined from /tmp/isolated.xml

    [root@example /]#
    [root@example /]# virsh net-autostart isolated
    Network isolated marked as autostarted

    [root@example /]#
    [root@example /]# virsh net-start isolated
    Network isolated started

    [root@example /]#

    30: virbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
        link/ether 52:54:00:e7:9e:85 brd ff:ff:ff:ff:ff:ff
        inet 192.168.254.1/24 brd 192.168.254.255 scope global virbr1

    5.  Add a new <interface> and source as <source network='isolated'/>.

    6. Choose Model type <model type='virtio'/>.
    7. Restart the guest.

    No comments