Files
infix/test/case/cli/system-output/ip-addr-show.json
T
Richard Alpe 707e7d1a29 yanger: skip internal interfaces
In "14128047e18d statd: remove nl code and improve speed" the handling
of all interfaces where moved from statd to Yanger. This means statd no
longer tracks interfaces using Netlink, but instead relies on Yanger
to recognise and list all interfaces in the system. In the midst of
this change the ignoring of "internal" interfaces where lost.

In this commit we reintroduce this logic in Yanger and add a test case
that ensures internal interfaces isn't listed.

Fixes: 14128047e1 statd: remove nl code and improve speed

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-10-01 14:28:31 +02:00

630 lines
15 KiB
JSON

[
{
"ifindex": 2,
"ifname": "dsa0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1504,
"qdisc": "mq",
"operstate": "UP",
"group": "internal",
"txqlen": 2048,
"link_type": "ether",
"address": "02:00:de:ad:02:20",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 9888,
"num_tx_queues": 8,
"num_rx_queues": 4,
"gso_max_size": 65536,
"gso_max_segs": 300,
"tso_max_size": 65536,
"tso_max_segs": 300,
"gro_max_size": 65536,
"gso_ipv4_max_size": 65536,
"gro_ipv4_max_size": 65536,
"parentbus": "platform",
"parentdev": "f2000000.ethernet",
"addr_info": [],
"stats64": {
"rx": {
"bytes": 1756811,
"packets": 6777,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 1849127,
"packets": 7157,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 7,
"ifname": "br0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:00",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_kind": "bridge",
"info_data": {
"forward_delay": 1500,
"hello_time": 200,
"max_age": 2000,
"ageing_time": 30000,
"stp_state": 0,
"priority": 32768,
"vlan_filtering": 1,
"vlan_protocol": "802.1Q",
"bridge_id": "8000.2:0:0:0:0:0",
"root_id": "8000.2:0:0:0:0:0",
"root_port": 0,
"root_path_cost": 0,
"topology_change": 0,
"topology_change_detected": 0,
"hello_timer": 0,
"tcn_timer": 0,
"topology_change_timer": 0,
"gc_timer": 63.88,
"vlan_default_pvid": 0,
"vlan_stats_enabled": 0,
"vlan_stats_per_port": 0,
"group_fwd_mask": "0",
"group_addr": "01:80:c2:00:00:00",
"mcast_snooping": 0,
"no_linklocal_learn": 0,
"mcast_vlan_snooping": 0,
"mcast_router": 1,
"mcast_query_use_ifaddr": 0,
"mcast_querier": 0,
"mcast_hash_elasticity": 16,
"mcast_hash_max": 4096,
"mcast_last_member_cnt": 2,
"mcast_startup_query_cnt": 2,
"mcast_last_member_intvl": 100,
"mcast_membership_intvl": 26000,
"mcast_querier_intvl": 25500,
"mcast_query_intvl": 12500,
"mcast_query_response_intvl": 1000,
"mcast_startup_query_intvl": 3124,
"mcast_stats_enabled": 0,
"mcast_igmp_version": 2,
"mcast_mld_version": 1,
"nf_call_iptables": 0,
"nf_call_ip6tables": 0,
"nf_call_arptables": 0
}
},
"inet6_addr_gen_mode": "none",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 65536,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"stats64": {
"rx": {
"bytes": 3158,
"packets": 42,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 37
},
"tx": {
"bytes": 0,
"packets": 0,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 8,
"ifname": "br1",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:02",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_kind": "bridge",
"info_data": {
"forward_delay": 1500,
"hello_time": 200,
"max_age": 2000,
"ageing_time": 30000,
"stp_state": 0,
"priority": 32768,
"vlan_filtering": 1,
"vlan_protocol": "802.1Q",
"bridge_id": "8000.2:0:0:0:0:2",
"root_id": "8000.2:0:0:0:0:2",
"root_port": 0,
"root_path_cost": 0,
"topology_change": 0,
"topology_change_detected": 0,
"hello_timer": 0.00,
"tcn_timer": 0.00,
"topology_change_timer": 0.00,
"gc_timer": 0.00,
"vlan_default_pvid": 0,
"vlan_stats_enabled": 0,
"vlan_stats_per_port": 0,
"group_fwd_mask": "0",
"group_addr": "01:80:c2:00:00:00",
"mcast_snooping": 0,
"no_linklocal_learn": 0,
"mcast_vlan_snooping": 0,
"mcast_router": 1,
"mcast_query_use_ifaddr": 0,
"mcast_querier": 0,
"mcast_hash_elasticity": 16,
"mcast_hash_max": 4096,
"mcast_last_member_cnt": 2,
"mcast_startup_query_cnt": 2,
"mcast_last_member_intvl": 100,
"mcast_membership_intvl": 26000,
"mcast_querier_intvl": 25500,
"mcast_query_intvl": 12500,
"mcast_query_response_intvl": 1000,
"mcast_startup_query_intvl": 3124,
"mcast_stats_enabled": 0,
"mcast_igmp_version": 2,
"mcast_mld_version": 1,
"nf_call_iptables": 0,
"nf_call_ip6tables": 0,
"nf_call_arptables": 0
}
},
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 65536,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"addr_info": [],
"stats64": {
"rx": {
"bytes": 0,
"packets": 0,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 0,
"packets": 0,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 2,
"ifname": "e0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "pfifo_fast",
"master": "br0",
"operstate": "UP",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:00",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 1,
"allmulti": 1,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_slave_kind": "bridge",
"info_slave_data": {
"state": "forwarding",
"priority": 32,
"cost": 100,
"hairpin": false,
"guard": false,
"root_block": false,
"fastleave": false,
"learning": true,
"flood": true,
"id": "0x8001",
"no": "0x1",
"designated_port": 32769,
"designated_cost": 0,
"bridge_id": "8000.2:0:0:0:0:0",
"root_id": "8000.2:0:0:0:0:0",
"hold_timer": 0,
"message_age_timer": 0,
"forward_delay_timer": 0,
"topology_change_ack": 0,
"config_pending": 0,
"proxy_arp": false,
"proxy_arp_wifi": false,
"multicast_router": 1,
"mcast_flood": true,
"bcast_flood": true,
"mcast_to_unicast": false,
"neigh_suppress": false,
"group_fwd_mask": "0",
"group_fwd_mask_str": "0x0",
"vlan_tunnel": false,
"isolated": false,
"locked": false
}
},
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 65536,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"parentbus": "virtio",
"parentdev": "virtio2",
"stats64": {
"rx": {
"bytes": 6795,
"packets": 62,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 22830,
"packets": 114,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 3,
"ifname": "e1",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "pfifo_fast",
"master": "br0",
"operstate": "UP",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:01",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 1,
"allmulti": 1,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_slave_kind": "bridge",
"info_slave_data": {
"state": "forwarding",
"priority": 32,
"cost": 100,
"hairpin": false,
"guard": false,
"root_block": false,
"fastleave": false,
"learning": true,
"flood": true,
"id": "0x8002",
"no": "0x2",
"designated_port": 32770,
"designated_cost": 0,
"bridge_id": "8000.2:0:0:0:0:0",
"root_id": "8000.2:0:0:0:0:0",
"hold_timer": 0,
"message_age_timer": 0,
"forward_delay_timer": 0,
"topology_change_ack": 0,
"config_pending": 0,
"proxy_arp": false,
"proxy_arp_wifi": false,
"multicast_router": 1,
"mcast_flood": true,
"bcast_flood": true,
"mcast_to_unicast": false,
"neigh_suppress": false,
"group_fwd_mask": "0",
"group_fwd_mask_str": "0x0",
"vlan_tunnel": false,
"isolated": false,
"locked": false
}
},
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 65536,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"parentbus": "virtio",
"parentdev": "virtio3",
"stats64": {
"rx": {
"bytes": 1397,
"packets": 11,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 23781,
"packets": 126,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 4,
"ifname": "e2",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "pfifo_fast",
"master": "br1",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:02",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 0,
"allmulti": 1,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_slave_kind": "bridge",
"info_slave_data": {
"state": "forwarding",
"priority": 32,
"cost": 100,
"hairpin": false,
"guard": false,
"root_block": false,
"fastleave": false,
"learning": true,
"flood": true,
"id": "0x8001",
"no": "0x1",
"designated_port": 32769,
"designated_cost": 0,
"bridge_id": "8000.2:0:0:0:0:2",
"root_id": "8000.2:0:0:0:0:2",
"hold_timer": 0.00,
"message_age_timer": 0.00,
"forward_delay_timer": 0.00,
"topology_change_ack": 0,
"config_pending": 0,
"proxy_arp": false,
"proxy_arp_wifi": false,
"multicast_router": 1,
"mcast_flood": true,
"bcast_flood": true,
"mcast_to_unicast": false,
"neigh_suppress": false,
"group_fwd_mask": "0",
"group_fwd_mask_str": "0x0",
"vlan_tunnel": false,
"isolated": false,
"locked": false
}
},
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 65536,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"parentbus": "virtio",
"parentdev": "virtio4",
"addr_info": [
{
"family": "inet6",
"local": "fe80::ff:fe00:2",
"prefixlen": 64,
"scope": "link",
"protocol": "kernel_ll",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
],
"stats64": {
"rx": {
"bytes": 0,
"packets": 0,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 19676,
"packets": 83,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 5,
"ifname": "e3",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "pfifo_fast",
"operstate": "UP",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:03",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 65535,
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 65536,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"parentbus": "virtio",
"parentdev": "virtio5",
"stats64": {
"rx": {
"bytes": 1327,
"packets": 10,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 13837,
"packets": 67,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 6,
"ifname": "e4",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "pfifo_fast",
"operstate": "DOWN",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:04",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 65535,
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 65536,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"parentbus": "virtio",
"parentdev": "virtio6",
"stats64": {
"rx": {
"bytes": 1327,
"packets": 10,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 18046,
"packets": 91,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
}
]