View previous topic :: View next topic |
Author |
Message |
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Thu Oct 31, 2013 3:03 pm Post subject: host/guest communication with macvlan without router. Help. |
|
|
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
ip address add 192.168.1.100/24 dev macvlan0
ip link set dev macvlan0 up
ip route flush dev p10p1
ip route add default via 192.168.1.1 dev macvlan0 proto static |
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
Code: | 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 |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Fri Nov 08, 2013 2:02 pm Post subject: |
|
|
nobody got an opinion?
If I do:
Code: | 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?
Code: |
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. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|