Skip to content

IPv4 & v6 network configuration on Debian #46388

Closed

Description

@dynek

Description of Issue/Question

Unable to create working network configuration for DHCP IPv4 and static IPv6.
Instruction "iface eth0 inet dhcp" is missing for IPv4.

Setup

Simple setup for DHCP IPv4.
SLS:

eth0:
  network.managed:
    - enabled: True
    - type: eth
    - proto: dhcp

/etc/network/interfaces content is OK:

auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eth0
iface eth0 inet dhcp

Adding Static IPv6 configuration:

eth0:
  network.managed:
    - enabled: True
    - type: eth
    - proto: dhcp
    - enable_ipv6: True
    - ipv6proto: static
    - ipv6ipaddr: <ipv6ipaddr>
    - ipv6netmask: 64
    - ipv6gateway: <ipv6gateway>

/etc/network/interfaces content not OK (doesn't contain iface eth0 inet dhcp).
Acting like "proto: dhcp" was not specified:

auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eth0
iface eth0 inet6 static
    address <ipv6ipaddr>
    netmask 64
    gateway <ipv6gateway>

Steps to Reproduce Issue

Use SLS declarations above

Versions Report

Master version is 2017.7.2

And the minion:

Salt Version:                                                                                                                                                                                                                                                                                                                 
           Salt: 2017.7.3
 
Dependency Versions:
           cffi: 1.11.2
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: 2.18
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.14+ (default, Dec  5 2017, 15:17:02)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.3
 
System Versions:
           dist: debian buster/sid 
         locale: UTF-8
        machine: x86_64
        release: 4.14.0-2-amd64
         system: Linux
        version: debian buster/sid 

Activity

  1. Ch3LL commented on Mar 6, 2018

    @Ch3LL
    Contributor

    ping @garethgreenaway can you take a look here. Does the state look proper for the use case?

  2. added
    pending-discussion
    on Mar 6, 2018
  3. modified the milestones: Approved, Blocked on Mar 6, 2018
  4. dynek commented on Apr 12, 2018

    @dynek
    Author

    Any news?

  5. MTecknology commented on Aug 28, 2018

    @MTecknology
    Contributor

    @dynek Could you try PR #49355 and tell me if it resolves your issue?

  6. dynek commented on Aug 28, 2018

    @dynek
    Author

    @MTecknology as far as I was able to test it doesn't change anything

  7. MTecknology commented on Aug 29, 2018

    @MTecknology
    Contributor

    I took a closer look. I believe this is happening within _parse_settings_eth(). When def_addrfam is 'inet6', the 'proto' option gets assigned to iface_data['inet6']. The logic in this function needs to change, but it could take some time to work out.

  8. MTecknology commented on Aug 31, 2018

    @MTecknology
    Contributor

    @dynek Could you try again with PR #49462?

  9. dynek commented on Sep 4, 2018

    @dynek
    Author

    Haven't had time to test it. Let's see how it goes when it's released as a package. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-discussion

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions