[pve-devel] [PATCH] add routed network mode

Dietmar Maurer dietmar at proxmox.com
Mon Aug 26 15:40:39 CEST 2013


> >>+sub enable_proxyarp {
> >>+    my ($ifname) = @_;
> >>+
> >>+    PVE::Tools::run_command("echo 1 >
> >>+/proc/sys/net/ipv4/conf/$ifname/proxy_arp");
> >>+}
> >>+
> >>+PVE::Tools::run_command("ifconfig $iface up");
> >>+enable_proxyarp($iface);
> 
> 
> Do we really need proxyarp ?

yes, see below.

> I mean, arp request shouldn't go to external
> vmbr0 unless eth0 is plugged on same bridge than vm nic
> 
> 
> 
> >>+my $external_iface = 'vmbr0'; # fixme: autotetect?
> 
> I think we can simply detect the vmbrX with the defaut gw ?

No, we need to compare the network setup to find the interface
where to send proxyarp.
 
> >>+enable_proxyarp($iface);
> >>+
> >>+PVE::Tools::run_command("route add -net $net->{ip} netmask
> >>+255.255.255.255 dev $iface");
> 
> So, if I understand you don't use bridge ? but directly route from host to tap
> interface ?

yes

> If yes,how do you setup guest configuration ?

dhcp, but I have not any code so far.


More information about the pve-devel mailing list