connecting host and guest vm using a dummy nic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings all,

I have a host machine that runs a router within a vm.
I want to allow a connection between the host and the guest so the host can connect to the lan provided by the router vm.
I've created a dummy interface with these commands:
$ ip link add ens99-dummy type dummy
$ ip link set ens99-dummy address 52:54:00:1f:d0:ff

this resulted with this output:
$ ifconfig ens99-dummy
ens99-dummy Link encap:Ethernet  HWaddr 52:54:00:1F:D0:FF 
          inet6 addr: fe80::84b5:24ff:fe62:c16d/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:899 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:321727 (314.1 KiB)


in my libvirt's xml file I have this entry:
    <interface type='direct'>
      <mac address='52:54:00:0c:cb:3e'/>
      <source dev='ens99-dummy' mode='private'/>
      <target dev='macvtap0'/>
      <model type='e1000'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>

after the vm is up, I see the adapter in the vm and the host has one more entry:
$ ifconfig macvtap0
macvtap0  Link encap:Ethernet  HWaddr 52:54:00:0C:CB:3E 
          inet6 addr: fe80::5054:ff:fe0c:cb3e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:889 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:320523 (313.0 KiB)

but when I try to request ip via dhcp from both macvtap0 and ens99-dummy I don't get any.
any idea why?

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux