On a linux, if I enumerate interfaces using standards tools I get :
~# ip link list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 00:1c:c4:74:83:80 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 00:1c:c4:74:83:80 brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:1c:c4:74:83:80 brd ff:ff:ff:ff:ff:ff
~# cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 3406986600 26540155 0 0 0 0 0 0 3406986600 26540155 0 0 0 0 0 0
eth0: 40938625356 197161174 0 0 0 0 0 1254629 626979237863 480085481 0 0 0 0 0 0
eth1: 72695854413 260987060 6 0 0 6 0 1254612 699024977778 507216135 0 0 0 0 0 0
bond0:
113634479769 458148234 6 0 0 6 0 2509241 1326004215641 987301616 0 0 0 0 0 0
I don't use ifconfig any more, it's deprecated since ages.
But with facter I got one more :
~# /opt/puppetlabs/bin/facter interfaces
bond0,bond0:1,eth0,eth1,lo
Because bond0 has two interfaces :
~# ip addr list bond0
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:1c:c4:74:83:80 brd ff:ff:ff:ff:ff:ff
inet xxx/20 brd xxxx scope global bond0
inet xxx/20 brd xxx scope global secondary bond0:1
In full structured view I get
networking => {
....
interfaces => {
bond0 => {
},
bond0:1 => {
},
},
}
I would expect something like:
networking => {
....
interfaces => {
bond0 => {
[ ip => ]
[ ip => ]
},
},
}
Is that a bug or a feature ?
My view it's bug, because when I ask for interfaces, I mean interfaces, not interfaces and friends. But it might be different on other OS.
In full struc