Re: buggy --denyinterfaces behaviour
Roy Marples
Thu Aug 25 20:58:10 2016
Hi TC
On Thursday 25 August 2016 16:39:49 tokiclover wrote:
> I am getting a very annoying issue here related to using
> `--denyinterfaces vmnet[0-9]_[0-9]' usage.
>
> Why using that... command line switch? The issue is as... setting up
> multiple virtual LAN for different VMs result in: when an interface is
> connected to a virtual machine, a network event trigger dhcpcd to
> configure the interface with a weird IP address starting from 169.x.y.z
> which I did not even verify where it was comming from. And *this* would
> block any quest from properly getting an IP adress from DHCP server in
> the virtual LAN subnet!
169.254.x.x is an IPv4LL address, in the absence of a DHCP or static address.
This is normal behavior.
> SOLUTION (or I've thought was): use --denyinterfaces to order dhcpcd to
> leave those interfaces alone! Now, with this... dhcpcd just get in the
> way (in a unknown way) to block the interfaces to be properly
> configured, starting with disapearance from `ifconfig' command... to
> interfaces linkage breakages--VDE switches attached to the interfaces
> cannot properly communicate with the network. Listing the virtual
> interfaces in `/sys/class/net' or /sys/devices/virtual/net' shows that
> the interfaces are there but are unusable.
>
> SOLUTION: removed the --denyinterfaces and...
>
> So, I had to set up each interface with `ifconfig IFACE 0.0.0.0'
> whenever a virtual machine is launched. How annoying... And how annying
> to figure this up, I had to restart host machine twice for nothing and
> lost some time and patience between a few unsuccessful attempts.
>
> Help is welcomed,
OK, so ifconfig will only report interfaces marked IFF_UP.
Adding an address, such as 0.0.0.0, will also mark the interface IFF_UP.
Saying that, why don't you use the `ip a` command to see the interfaces you
need? ip will show them regardless of IFF_UP.
If that's the real solution, then there is an alternative - just turn off
protocols for the interface rather than denying them and dhcpcd will bring
them UP for you. However, you have to reverse your logic like so
# Disable protocols by default
nodhcp
noipv6rs
interface eth0
# Bring up protocols for allowed interface
dhcp
ipv6rs
Replace eth0 with your working interface. If more than one, put more interface
blocks.
However, that's a waste of dhcpcd doing it really and I would look into
another solution.
Roy
Archive administrator: postmaster@marples.name