Bridge with dynamic IP and static fallback



Hi there!

I am using NetworkManager 1.0.4 on my linux box and have no success in
configuring a setup that can be simplified to the following:

  - create a software bridge
  - attach an ethernet device to the bridge
  - try to acquire a dynamic IPv4 address for the bridge using DHCP
  - if this fails configure the bridge with a static IPv4 address

To achieve this I created three connections. At first for a bridge device that
tries to automatically get an IPv4 address:

  [connection]
  id=bridge-auto
  uuid=34e70494-4022-4d29-b8c7-005577ecc04c
  interface-name=bridge0
  type=bridge
  autoconnect-slaves=1

  [ipv6]
  method=auto

  [ipv4]
  method=auto

Then in analogy a connection for a bridge device with a static IPv4 address:

  [connection]
  id=bridge-manual
  uuid=95618056-bc23-4d23-adf9-d1de6de91645
  interface-name=bridge0
  type=bridge
  autoconnect-slaves=1
  autoconnect-priority=-10

  [ipv6]
  method=auto

  [ipv4]
  method=manual
  address1=192.168.3.37/24,192.168.3.254

And last not least the connection that enslaves the ethernet device to the
software bridge:

  [802-3-ethernet]
  duplex=full

  [connection]
  id=eth-bridgeport
  uuid=b3f9ebf2-3200-11e5-a811-001e67119c5c
  type=802-3-ethernet
  slave-type=bridge
  master=bridge0
  autoconnect=false

Bringing one or the other bridge connection up manually everything works as
expected. If instead NetworkManager cares about bringing up the connections
automatically it first tries 'bridge-auto' (default autoconnect-priority=0). So
far so good. But if it fails to acquire a dynamic IPv4 address NetworkManager
does not try connection 'bridge-manual' which should be the next (autoconnect-
priority=-10). Why? What am I doing wrong? How can I achieve the setup that I
outlined in the beginning?

Best regards
Ulrich



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