Feature #3734

ipaddress fact does not handle virtual and trunked interfaces gracefully

Added by Jeff McCune about 2 years ago. Updated 5 months ago.

Status:Needs More Information Start date:05/06/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:library
Target version:1.6.x
Keywords:ipaddress, facter, interface, trunk, virtual Affected Facter version:
Branch:
Votes: 0

Description

Impact Data This issue was brought up in a puppetmaster training session in Boston, MA the first week of May 2010.

Problem statement The ipaddress fact does not handle interfaces that are both trunked and virtual such as eth0.1:2

Desired Behavior We need to know from facter if an interface is virtual or is trunked or is both. Right now there is no easy way to differentiate.

Actual Behavior: The ipaddress fact behaves like so:

When trunked interfaces get a period, when virtual they get a :, like eth0:1 or eth0.1 On some machines there are both, like eth0.1:2

Two issues, one facter should differentiate between trunked and virtual interfaces. Two, when there is a virtual interface on a trunk, it is currently lost. eth0.1:2 becomes eth0_1

History

Updated by Jeff McCune about 2 years ago

Information from the client:

eth0      Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet6 addr: fe80::222:19ff:fe11:8f9f/64 Scope:Link
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
     RX packets:123028305 errors:0 dropped:0 overruns:0 frame:0
     TX packets:2785499 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:1000
     RX bytes:18232468231 (16.9 GiB)  TX bytes:689146605 (657.2 MiB)
     Interrupt:177 Memory:efdf0000-efe00000

eth0.160  Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.190.58  Bcast:192.168.191.255  Mask:255.255.252.0
     inet6 addr: fe80::222:19ff:fe11:8f9f/64 Scope:Link
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
     RX packets:4113036 errors:0 dropped:0 overruns:0 frame:0
     TX packets:54980 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:0
     RX bytes:336027667 (320.4 MiB)  TX bytes:4065074 (3.8 MiB)

eth0.160:42 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.42  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:43 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.43  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:44 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.44  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:45 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.45  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:46 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.46  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:47 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.47  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:48 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.48  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:49 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.49  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:50 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.50  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:51 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.51  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:52 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.52  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:53 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.53  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:54 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.54  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:55 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.55  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:66 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.188.66  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:142 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.189.142  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:143 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.189.143  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:144 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.189.144  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:145 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.189.145  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:146 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.189.146  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:147 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.189.147  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0.160:148 Link encap:Ethernet  HWaddr 00:22:19:11:8F:9F
     inet addr:192.168.189.148  Bcast:192.168.191.255  Mask:255.255.252.0
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

interfaces => eth0,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_160,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_161,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_162,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_164,eth0_170,eth1,eth2,eth3,eth4,eth5,sit0
ipaddress => 192.168.190.58
ipaddress_eth0_160 => 192.168.190.58
ipaddress_eth0_161 => 192.168.201.58
ipaddress_eth0_162 => 192.168.202.58
ipaddress_eth0_164 => 192.168.204.62
ipaddress_eth0_170 => 10.210.0.80
macaddress => 00:22:19:11:8F:9F
macaddress_eth0 => 00:22:19:11:8F:9F
macaddress_eth0_160 => 00:22:19:11:8F:9F
macaddress_eth0_161 => 00:22:19:11:8F:9F
macaddress_eth0_162 => 00:22:19:11:8F:9F
macaddress_eth0_164 => 00:22:19:11:8F:9F
macaddress_eth0_170 => 00:22:19:11:8F:9F
macaddress_eth1 => 00:22:19:11:8F:A0
macaddress_eth2 => 00:1B:21:28:B8:18
macaddress_eth3 => 00:1B:21:28:B8:19
macaddress_eth4 => 00:1B:21:28:B8:1C
macaddress_eth5 => 00:1B:21:28:B8:1D
netmask => 255.255.252.0
netmask_eth0_160 => 255.255.252.0
netmask_eth0_161 => 255.255.255.0
netmask_eth0_162 => 255.255.255.0
netmask_eth0_164 => 255.255.255.0
netmask_eth0_170 => 255.255.0.0
network_eth0_160 => 192.168.188.0
network_eth0_161 => 192.168.201.0
network_eth0_162 => 192.168.202.0
network_eth0_164 => 192.168.204.0
network_eth0_170 => 10.210.0.0

Updated by James Turnbull about 2 years ago

  • Category set to library
  • Status changed from Unreviewed to Accepted
  • Target version set to 1.6.0

Updated by Paul Nasrat almost 2 years ago

  • Status changed from Accepted to Needs More Information

Jeff, can you also attach the output of (as root) /sbin/ip addr on a system with trunking and virtuals.

Cheers

Updated by Paul Nasrat almost 2 years ago

  • Assignee set to Paul Nasrat

Updated by Michael Stahnke 11 months ago

  • Target version changed from 1.6.0 to 1.6.x

Updated by Adrien Thebo 5 months ago

  • Assignee deleted (Paul Nasrat)

Also available in: Atom PDF