# host/guest communication with macvlan without router. Help.

## _______0

hi,

Some place on the internet there's a claim to have solve this.

 *Quote:*   

> The solution is to configure a macvlan interface on the hypervisor, with the same IP address than the real hardware interface (very important), and to configure routing on the host to use it. In Qemu/KVM, use a macvtap interface on the hardware interface as usual.
> 
> For my config (192.168.1.0/24 network, p10p1 hardware interface, and 192.168.1.1 gateway), it gives (on the hypervisor):
> 
> ip link add link p10p1 address 00:19:d1:29:d2:58 macvlan0 type macvlan mode bridge
> ...

 

But I don't fully understand this part:

 *Quote:*   

> The solution is to configure a macvlan interface on the hypervisor, with the same IP address than the real hardware interface (very important)

 

He only shows how to assign ip address add 192.168.1.100/24 dev macvlan0 but p10p1 is left out.

Do I have to assume that he did this on the hardware interface?

ip address add 192.168.1.100/24 dev p10p1

And the second part:

and to configure routing on the host to use it

```
ip route flush dev p10p1

ip route add default via 192.168.1.1 dev macvlan0 proto static
```

What he's doing here is to flush p10p1 of any routing and switching it to macvlan0. But, doesn't flushing an interface clear completely the routing table making it almost isolated?

And the last part:

 *Quote:*   

> In Qemu/KVM, use a macvtap interface on the hardware interface as usual.

 

Mmm.... possibly got it by writing this post :/ use macvTAP as opposed to macvlan0.

Still, can any expert comment on this?

thanks.Last edited by _______0 on Fri Nov 08, 2013 2:04 pm; edited 1 time in total

----------

## _______0

nobody got an opinion?

If I do:

```
ip route flush dev p10p1
```

It deletes completely its routing table in the command route, it won't appear.

Also this part:

 *Quote:*   

> with the same IP address than the real hardware interface (very important)

 

Implies this?

```

ip address add 192.168.1.100/24 dev p10p1

ip address add 192.168.1.100/24 dev macvlan0
```

I am not getting it.

And if the host has this default route 192.168.1.1, what's this on the guest? The gateway? nameserver in /etc/resolv.conf??

thanks.

----------

