Jira (FACT-2907) networking: add binding flags to bindings6 entries

26 views
Skip to first unread message

john (Jira)

unread,
Jan 5, 2021, 12:03:02 PM1/5/21
to puppe...@googlegroups.com
john created an issue
 
Facter / New Feature FACT-2907
networking: add binding flags to bindings6 entries
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2021/01/05 9:02 AM
Priority: Normal Normal
Reporter: john

It would be nice if we could update the networking.$iface.bundings6 entries to also include binding flags. As an example given the following:

2: en0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
 link/ether aa:aa:bb:bb:cc:cc brd ff:ff:ff:ff:ff:ff
inet6 2001:db8::aaaa:bbff:febb:cccc/64 scope global mngtmpaddr dynamic
 valid_lft forever preferred_lft forever
inet6 2001:db8::1/64 scope global
 valid_lft forever preferred_lft forever
inet6 fe80::aaaa:bbff:febb:cccc/64 scope link
 valid_lft forever preferred_lft forever

'en0' => {
  'bindings6' => [
        {
          address => "2001:db8::aaaa:bbff:febb:cccc",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "2620:0:861:103::"
          'scope' => "global"
          'flags' => ['mngtmpaddr', 'dynamic']
        },
        {
          address => "2001:db8::1",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "2620:0:861:103::"
          'scope' => "global"
        },
        {
          address => "fe80::aaaa:bbff:febb:cccc",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "fe80::"
          'scope' => "link"
        }
  ]

The flags are useful when deciding which addresses to configure daemons to bind to. for instance i would not want a daemon to bind to any binding6 which has either the dynamic or temporary

Further i think this could be used in determining the network.ip6 fact. for instance we have environment that have static ipv6 addresses as well as a SLAAC address. I think in this instance when there multiple bindings the ones which have flags of mngtmpaddr or dynamic should no be prefered as the primary. however (at least in our environment) the SLAAC address is perfered

% sudo ip -6 addr show dev private                                              [16:57:07]
6: private: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2620:0:861:101:1a66:daff:fea3:af25/64 scope global mngtmpaddr dynamic 
       valid_lft 2591993sec preferred_lft 604793sec
    inet6 2620:0:861:101:10:64:0:245/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::1a66:daff:fea3:af25/64 scope link 
       valid_lft forever preferred_lft forever

% sudo facter -p networking.interfaces.private                                  [16:57:28]
{
  bindings => [
    {
      address => "10.64.0.245",
      netmask => "255.255.252.0",
      network => "10.64.0.0"
    }
  ],
  bindings6 => [
    {
      address => "2620:0:861:101:1a66:daff:fea3:af25",
      netmask => "ffff:ffff:ffff:ffff::",
      network => "2620:0:861:101::"
    },
    {
      address => "2620:0:861:101:10:64:0:245",
      netmask => "ffff:ffff:ffff:ffff::",
      network => "2620:0:861:101::"
    },
    {
      address => "fe80::1a66:daff:fea3:af25",
      netmask => "ffff:ffff:ffff:ffff::",
      network => "fe80::"
    }
  ],
  ip => "10.64.0.245",
  ip6 => "2620:0:861:101:1a66:daff:fea3:af25",
  mac => "18:66:da:a3:af:25",
  mtu => 1500,
  netmask => "255.255.252.0",
  netmask6 => "ffff:ffff:ffff:ffff::",
  network => "10.64.0.0",
  network6 => "2620:0:861:101::"
}

I previously mentioned this in FACT-2843

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

john (Jira)

unread,
Jan 5, 2021, 12:03:04 PM1/5/21
to puppe...@googlegroups.com
john updated an issue
Change By: john
It would be nice if we could update the networking.$iface.bundings6 entries to also include binding flags.  As an example given the following:

{code:bash}

2: en0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether aa:aa:bb:bb:cc:cc brd ff:ff:ff:ff:ff:ff
inet6 2001:db8::aaaa:bbff:febb:cccc/64 scope global mngtmpaddr dynamic
valid_lft forever preferred_lft forever
inet6 2001:db8::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::aaaa:bbff:febb:cccc/64 scope link
valid_lft forever preferred_lft forever
{code}

It would be nice to get the following facts
{code:Ruby}

'en0' => {
  'bindings6' => [
        {
          address => "2001:db8::aaaa:bbff:febb:cccc",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "2620:0:861:103::"
          'scope' => "global"
          'flags' => ['mngtmpaddr', 'dynamic']
        },
        {
          address => "2001:db8::1",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "2620:0:861:103::"
          'scope' => "global"
        },
        {
          address => "fe80::aaaa:bbff:febb:cccc",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "fe80::"
          'scope' => "link"
        }
  ]
{code}


The flags are useful when deciding which addresses to configure daemons to bind to.  for instance i would not want a daemon to bind to any binding6 which has either the  dynamic or temporary

Further i think this could be used in determining the network.ip6 fact.  for instance we have environment that have static ipv6 addresses as well as a SLAAC address.  I think in this instance when there multiple bindings the ones which have flags of mngtmpaddr or dynamic should no be prefered as the primary.   however (at least in our environment) the SLAAC address is perfered

{code:bash}

% sudo ip -6 addr show dev private                     [16:57:07]
6: private: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2620:0:861:101:1a66:daff:fea3:af25/64 scope global mngtmpaddr dynamic
       valid_lft 2591993sec preferred_lft 604793sec
    inet6 2620:0:861:101:10:64:0:245/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::1a66:daff:fea3:af25/64 scope link
       valid_lft forever preferred_lft forever
{code}
  
{code:bash}
{code}


I previously mentioned this in FACT-2843

john (Jira)

unread,
Jan 5, 2021, 12:04:03 PM1/5/21
to puppe...@googlegroups.com
john updated an issue
It would be nice if we could update the networking.$iface.bundings6 entries to also include binding flags.  As an example given the following:

{code:bash}
% sudo ip -6 addr show dev en0
6: private: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2620:0:861:101:1a66:daff:fea3:af25/64 scope global mngtmpaddr dynamic
       valid_lft 2591993sec preferred_lft 604793sec
    inet6 2620:0:861:101:10:64:0:245/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::1a66:daff:fea3:af25/64 scope link
       valid_lft forever preferred_lft forever
{code}
  
{code:bash}
% sudo facter -p networking.interfaces.private                    

john (Jira)

unread,
Jan 5, 2021, 12:04:03 PM1/5/21
to puppe...@googlegroups.com
john updated an issue
It would be nice if we could update the networking.$iface.bundings6 entries to also include binding flags.  As an example given the following:

{code:bash}
% sudo ip -6 addr show dev private                      [16:57:07]
                    
6: private: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2620:0:861:101:1a66:daff:fea3:af25/64 scope global mngtmpaddr dynamic
       valid_lft 2591993sec preferred_lft 604793sec
    inet6 2620:0:861:101:10:64:0:245/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::1a66:daff:fea3:af25/64 scope link
       valid_lft forever preferred_lft forever
{code}
  
{code:bash}
% sudo facter -p networking.interfaces.private                      [16:57:28]

john (Jira)

unread,
Jan 5, 2021, 12:05:03 PM1/5/21
to puppe...@googlegroups.com
john updated an issue
It would be nice if we could update the networking.$iface.bundings6 entries to also include binding flags.  As an example given the following:

{code:bash}
% sudo ip -6 addr show dev en0
Further i think this could be used in determining the network.ip6 fact.  for instance we have environment that have static ipv6 addresses as well as a SLAAC address.  I think in this instance when there multiple bindings the ones which have flags of mngtmpaddr or dynamic should no be prefered as the primary.   however (at least in our environment) the SLAAC address is perfered prefered (see below)

{code:bash}
% sudo ip -6 addr show dev private                    
6: private: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2620:0:861:101:1a66:daff:fea3:af25/64 scope global mngtmpaddr dynamic
       valid_lft 2591993sec preferred_lft 604793sec
    inet6 2620:0:861:101:10:64:0:245/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::1a66:daff:fea3:af25/64 scope link
       valid_lft forever preferred_lft forever
{code}
  
{code:bash}
% sudo facter -p networking.interfaces.private                    

john (Jira)

unread,
Apr 5, 2021, 10:23:03 AM4/5/21
to puppe...@googlegroups.com
john updated an issue
It would be nice if we could update the networking.$iface. bundings6 bindings6 entries to also include binding flags.  As an example given the following:
Further i think this could be used in determining the network.ip6 fact.  for instance we have environment that have static ipv6 addresses as well as a SLAAC address.  I think in this instance when there multiple bindings the ones which have flags of mngtmpaddr or dynamic should no be prefered as the primary.   however (at least in our environment) the SLAAC address is prefered (see below)
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Mihai Buzgau (Jira)

unread,
Apr 8, 2021, 7:01:03 AM4/8/21
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Apr 23, 2021, 4:49:02 AM4/23/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
May 6, 2021, 1:51:03 PM5/6/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
May 6, 2021, 1:55:02 PM5/6/21
to puppe...@googlegroups.com
Josh Cooper commented on New Feature FACT-2907

Verified the output contains permanent flag for bindings6:

# ip -6 addr show dev ens33
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::250:56ff:fe9a:a3eb/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
# facter networking.interfaces.ens33.bindings6
[
  {
    address => "fe80::250:56ff:fe9a:a3eb",
    netmask => "ffff:ffff:ffff:ffff::",
    network => "fe80::",
    scope6 => "link",
    flags => [
      "permanent"
    ]
  }
]

john (Jira)

unread,
May 7, 2021, 7:02:06 AM5/7/21
to puppe...@googlegroups.com
john commented on New Feature FACT-2907

As mentioned in the PR, the current implementation only exposes the lower 8 bits and not the extended flags (specificity it misses mngtmpaddr). however I'm fine if you want to close this issue i can raise another for the additional flags if needed

Gabriel Nagy (Jira)

unread,
May 19, 2021, 7:49:04 AM5/19/21
to puppe...@googlegroups.com
Gabriel Nagy commented on New Feature FACT-2907

john I think opening a new ticket would be the best approach. Thank you!

Gabriel Nagy (Jira)

unread,
May 19, 2021, 7:56:04 AM5/19/21
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
 
Change By: Gabriel Nagy
Release Notes: New Feature
Release Notes Summary: This release adds a new `flags` key under the `networking.interfaces.*.bindings6` fact which parses the lower 8-bit encoded flags from `/proc/net/if_inet6`. Note that the higher bit flags (managetempaddr, noprefixroute, mcautojoin, stableprivacy) are not yet supported/shown in the fact output. Feature contributed by community member b4ldr.

Gabriel Nagy (Jira)

unread,
May 19, 2021, 7:56:04 AM5/19/21
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Fix Version/s: FACT 4.2.0

Claire Cadman (Jira)

unread,
May 20, 2021, 8:28:02 AM5/20/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: community doc-reviewed

Claudia Petty (Jira)

unread,
Jun 21, 2023, 8:43:04 AM6/21/23
to puppe...@googlegroups.com
Claudia Petty updated an issue
Change By: Claudia Petty
Labels: community doc-reviewed new-feature
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages