Merge pull request #895 from kernelkit/yanger

Yanger Interfaces Refactor
This commit is contained in:
Tobias Waldekranz
2025-01-22 10:27:44 +01:00
committed by GitHub
198 changed files with 7092 additions and 4337 deletions
@@ -15,7 +15,7 @@
},
{
"name": "ipv6",
"address": "::1",
"address": "::",
"port": 22
}
],
@@ -21,7 +21,7 @@
},
{
"name": "ipv6",
"address": "::1",
"address": "::",
"port": 22
}
],
@@ -1,27 +0,0 @@
{
"infix-services:mdns": {
"enabled": true
},
"infix-services:web": {
"enabled": true,
"restconf": {
"enabled": true
}
},
"infix-services:ssh": {
"enabled": true,
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
],
"hostkey": [ "genkey" ]
}
}
+1
View File
@@ -0,0 +1 @@
../factory.d/10-infix-services.json
+5 -8
View File
@@ -27,7 +27,11 @@ submodule infix-if-bridge {
description "Linux bridge extension for ietf-interfaces.";
revision 2025-01-08 {
description "Add Spanning Tree Protocol (STP) support.";
description "Add Spanning Tree Protocol (STP) support.
Drop the `default-priority` bridge port option, which
has never been supported but was accidentally
included in the model.";
reference "internal";
}
@@ -699,13 +703,6 @@ submodule infix-if-bridge {
config false;
description "The operation state of the bridge port.";
}
leaf default-priority {
if-feature "vlan-filtering";
type dot1q-types:priority-type;
default "0";
description "The default priority assigned to this bridge port.";
}
}
augment "/if:interfaces/if:interface/infix-if:port" {
+25 -5
View File
@@ -10,12 +10,30 @@ from . import common
from . import host
def main():
def dirpath(path):
if not os.path.isdir(path):
raise argparse.ArgumentTypeError(f"'{path}' is not a valid directory")
return path
parser = argparse.ArgumentParser(description="YANG data creator")
parser.add_argument("model", help="YANG Model")
parser.add_argument("-p", "--param", default=None, help="Model dependent parameter")
parser.add_argument("-t", "--test", default=None, help="Test data base path")
args = parser.parse_args()
parser.add_argument("-p", "--param",
help="Model dependent parameter, e.g. interface name")
parser.add_argument("-x", "--cmd-prefix", metavar="PREFIX",
help="Use this prefix for all system commands, e.g. " +
"'ssh user@remotehost sudo'")
rrparser = parser.add_mutually_exclusive_group()
rrparser.add_argument("-r", "--replay", type=dirpath, metavar="DIR",
help="Generate output based on recorded system commands from DIR, " +
"rather than querying the local system")
rrparser.add_argument("-c", "--capture", type=dirpath, metavar="DIR",
help="Capture system command output in DIR, such that the current system " +
"state can be recreated offline (with --replay) for testing purposes")
args = parser.parse_args()
if args.replay and args.cmd_prefix:
parser.error("--cmd-prefix cannot be used with --replay")
# Set up syslog output for critical errors to aid debugging
common.LOG = logging.getLogger('yanger')
@@ -30,8 +48,10 @@ def main():
common.LOG.setLevel(logging.INFO)
common.LOG.addHandler(log)
if args.test:
host.HOST = host.Testhost(args.test)
if args.cmd_prefix or args.capture:
host.HOST = host.Remotehost(args.cmd_prefix, args.capture)
elif args.replay:
host.HOST = host.Replayhost(args.replay)
else:
host.HOST = host.Localhost()
-10
View File
@@ -1,15 +1,5 @@
LOG = None
def lookup(obj, *keys):
"""This function returns a value from a nested json object"""
curr = obj
for key in keys:
if isinstance(curr, dict) and key in curr:
curr = curr[key]
else:
return None
return curr
def insert(obj, *path_and_value):
""""This function inserts a value into a nested json object"""
+72 -9
View File
@@ -1,13 +1,16 @@
import abc
import datetime
import functools
import json
import os
import subprocess
from . import common
HOST = None
class Host(abc.ABC):
"""Host system API"""
@@ -30,7 +33,7 @@ class Host(abc.ABC):
def run_multiline(self, cmd, default=None):
"""Get lines of stdout of cmd"""
try:
txt = self.run(cmd, log=(default is None))
txt = self.run(tuple(cmd), log=(default is None))
return txt.splitlines()
except:
if default is not None:
@@ -40,7 +43,7 @@ class Host(abc.ABC):
def run_json(self, cmd, default=None):
"""Get JSON object from stdout of cmd"""
try:
txt = self.run(cmd, log=(default is None))
txt = self.run(tuple(cmd), log=(default is None))
return json.loads(txt)
except:
if default is not None:
@@ -66,10 +69,12 @@ class Host(abc.ABC):
return default
raise
class Localhost(Host):
def now(self):
return datetime.datetime.now(tz=datetime.timezone.utc)
@functools.cache
def run(self, cmd, default=None, log=True):
try:
result = subprocess.run(cmd, check=True, text=True,
@@ -98,16 +103,74 @@ class Localhost(Host):
return None
class Testhost(Host):
def __init__(self, basedir):
self.basedir = basedir
class Remotehost(Localhost):
def __init__(self, prefix, capdir):
super().__init__()
self.prefix = tuple(prefix.split()) if prefix else tuple()
self.capdir = capdir
if capdir:
for subdir in ("rootfs", "run"):
os.makedirs(os.path.join(capdir, subdir), exist_ok=True)
def now(self):
return datetime.datetime(2023, 1, 1, 12, 0, 0, tzinfo=datetime.timezone.utc)
timestamp = self._run(["date", "-u", "+%s"], default=None, log=True)
if self.capdir:
with open(os.path.join(self.capdir, "timestamp"), "w") as f:
f.write(f"{timestamp}\n")
pass
return datetime.datetime.fromtimestamp(int(timestamp), datetime.timezone.utc)
def _run(self, cmd, default, log):
# Assume that the wrapper acts like ssh(1) and simply concats
# arguments to a single string. Therefore, we must quoute
# arguments containing spaces so that commands like `vtysh -c
# "show ip route json"` work as expected.
cmd = " ".join([ arg if " " not in arg else f"\"{arg}\"" for arg in cmd ])
return super().run(self.prefix + (cmd,), default, log)
def run(self, cmd, default=None, log=True):
slug = "_".join(cmd).replace("/", "+").replace(" ", "-")
path = os.path.join(self.basedir, "run", slug)
if not self.capdir:
return self._run(cmd, default, log)
storedpath = os.path.join(self.capdir, "run", Replayhost.SlugOf(cmd))
if os.path.exists(storedpath):
with open(storedpath) as f:
return f.read()
out = self._run(cmd, default, log)
with open(storedpath, "w") as f:
f.write(out)
return out
def read(self, path):
out = self._run(("cat", path), default="", log=False)
if self.capdir:
dirname = os.path.join(self.capdir, "rootfs", os.path.dirname(path[1:]))
os.makedirs(dirname, exist_ok=True)
with open(os.path.join(self.capdir, "rootfs", path[1:]), "w") as f:
f.write(out)
return out
class Replayhost(Host):
def SlugOf(cmd):
return "_".join(cmd).replace("/", "+").replace(" ", "-")
def __init__(self, replaydir):
self.replaydir = replaydir
def now(self):
with open(os.path.join(self.replaydir, "timestamp")) as f:
timestamp = f.read().strip()
return datetime.datetime.fromtimestamp(int(timestamp), datetime.timezone.utc)
def run(self, cmd, default=None, log=True):
path = os.path.join(self.replaydir, "run", Replayhost.SlugOf(cmd))
try:
with open(path, 'r') as f:
@@ -121,7 +184,7 @@ class Testhost(Host):
raise
def read(self, path):
path = os.path.join(self.basedir, "rootfs", path[1:])
path = os.path.join(self.replaydir, "rootfs", path[1:])
try:
with open(path, 'r') as f:
return f.read()
@@ -1,564 +1,11 @@
from ..common import insert, lookup, LOG
from ..host import HOST
def json_get_yang_type(iface_in):
if iface_in['link_type'] == "loopback":
return "infix-if-type:loopback"
if iface_in['link_type'] in ("gre", "gre6"):
return "infix-if-type:gre"
if iface_in['link_type'] != "ether":
return "infix-if-type:other"
if 'parentbus' in iface_in and iface_in['parentbus'] == "virtio":
return "infix-if-type:etherlike"
if 'linkinfo' not in iface_in:
return "infix-if-type:ethernet"
if 'info_kind' not in iface_in['linkinfo']:
return "infix-if-type:ethernet"
if iface_in['linkinfo']['info_kind'] == "veth":
return "infix-if-type:veth"
if iface_in['linkinfo']['info_kind'] in ("gretap", "ip6gretap"):
return "infix-if-type:gretap"
if iface_in['linkinfo']['info_kind'] == "vlan":
return "infix-if-type:vlan"
if iface_in['linkinfo']['info_kind'] == "bridge":
return "infix-if-type:bridge"
if iface_in['linkinfo']['info_kind'] == "dsa":
return "infix-if-type:ethernet"
if iface_in['linkinfo']['info_kind'] == "dummy":
return "infix-if-type:dummy"
# Fallback
return "infix-if-type:ethernet"
def json_get_yang_origin(addr):
"""Translate kernel IP address origin to YANG"""
xlate = {
"kernel_ll": "link-layer",
"kernel_ra": "link-layer",
"static": "static",
"dhcp": "dhcp",
"random": "random",
}
proto = addr['protocol']
if proto in ("kernel_ll", "kernel_ra"):
if "stable-privacy" in addr:
return "random"
return xlate.get(proto, "other")
def iface_is_dsa(iface_in):
"""Check if interface is a DSA/intra-switch port"""
if "linkinfo" not in iface_in:
return False
if "info_kind" not in iface_in['linkinfo']:
return False
if iface_in['linkinfo']['info_kind'] != "dsa":
return False
return True
def get_bridge_port_pvid(ifname):
data = HOST.run_json(['bridge', '-j', 'vlan', 'show', 'dev', ifname])
if len(data) != 1:
return None
iface = data[0]
for vlan in iface['vlans']:
if 'flags' in vlan and 'PVID' in vlan['flags']:
return vlan['vlan']
return None
def get_bridge_port_stp_state(ifname):
data = HOST.run_json(['bridge', '-j', 'link', 'show', 'dev', ifname])
if len(data) != 1:
return None
iface = data[0]
states = ['disabled', 'listening', 'learning', 'forwarding', 'blocking']
if 'state' in iface and iface['state'] in states:
return iface['state']
return None
def get_brport_multicast(ifname):
"""Check if multicast snooping is enabled on bridge, default: nope"""
data = HOST.run_json(['mctl', '-p', 'show', 'igmp', 'json'], default={})
multicast = {}
if ifname in data.get('fast-leave-ports', []):
multicast["fast-leave"] = True
else:
multicast["fast-leave"] = False
if ifname in data.get('multicast-router-ports', []):
multicast["router"] = "permanent"
else:
multicast["router"] = "auto"
return multicast
# We always get all interfaces for two reasons.
# 1) To increase speed on large iron with many ports.
# 2) To simplify testing (single dummy file ip-link-show.json).
def get_ip_link():
"""Fetch interface link information from kernel"""
return HOST.run_json(['ip', '-s', '-d', '-j', 'link', 'show'])
def netns_get_ip_link(netns):
"""Fetch interface link information from within a network namespace"""
return HOST.run_json(['ip', 'netns', 'exec', netns, 'ip', '-s', '-d', '-j', 'link', 'show'])
def get_ip_addr():
"""Fetch interface address information from kernel"""
return HOST.run_json(['ip', '-j', 'addr', 'show'])
def netns_get_ip_addr(netns):
"""Fetch interface address information from within a network namespace"""
return HOST.run_json(['ip', 'netns', 'exec', netns, 'ip', '-j', 'addr', 'show'])
def get_netns_list():
"""Fetch a list of network namespaces"""
return HOST.run_json(['ip', '-j', 'netns', 'list'], [])
def netns_find_ifname(ifname):
"""Find which network namespace owns ifname (if any)"""
for netns in get_netns_list():
for iface in netns_get_ip_link(netns['name']):
if 'ifalias' in iface and iface['ifalias'] == ifname:
return netns['name']
return None
def netns_ifindex_to_ifname(ifindex):
"""Look through all network namespaces for an interface index and return its name"""
for netns in get_netns_list():
for iface in netns_get_ip_link(netns['name']):
if iface['ifindex'] == ifindex:
if 'ifalias' in iface:
return iface['ifalias']
if 'ifname' in iface:
return iface['ifname']
return None
return None
def add_bridge_port_common(ifname, iface_in, iface_out):
li = iface_in.get("linkinfo", {})
if not (li.get("info_slave_kind") == "bridge" or \
li.get("info_kind") == "bridge"):
return
pvid = get_bridge_port_pvid(ifname)
if pvid is not None:
insert(iface_out, "infix-interfaces:bridge-port", "pvid", pvid)
def add_bridge_port_lower(ifname, iface_in, iface_out):
li = iface_in.get("linkinfo", {})
if not li.get("info_slave_kind") == "bridge":
return
insert(iface_out, "infix-interfaces:bridge-port", "bridge", iface_in['master'])
stp_state = get_bridge_port_stp_state(ifname)
if stp_state is not None:
insert(iface_out, "infix-interfaces:bridge-port", "stp-state", stp_state)
multicast = get_brport_multicast(ifname)
insert(iface_out, "infix-interfaces:bridge-port", "multicast", multicast)
def add_gre(iface_in, iface_out):
if 'link_type' in iface_in:
val = json_get_yang_type(iface_in)
if val != "infix-if-type:gre" and val != "infix-if-type:gretap":
return;
gre={}
info_data=iface_in.get("linkinfo", {}).get("info_data", {})
gre["local"] = info_data.get("local")
gre["remote"] = info_data.get("remote")
insert(iface_out, "infix-interfaces:gre", gre)
def add_ip_link(ifname, iface_in, iface_out):
if 'ifname' in iface_in:
iface_out['name'] = ifname
if 'ifindex' in iface_in:
iface_out['if-index'] = iface_in['ifindex']
if 'ifalias' in iface_in:
iface_out['description'] = iface_in['ifalias']
if 'address' in iface_in and not "POINTOPOINT" in iface_in["flags"]:
iface_out['phys-address'] = iface_in['address']
add_bridge_port_common(ifname, iface_in, iface_out)
add_bridge_port_lower(ifname, iface_in, iface_out)
if not iface_is_dsa(iface_in):
if iface_in.get('link'):
insert(iface_out, "infix-interfaces:vlan", "lower-layer-if", iface_in['link'])
elif 'link_index' in iface_in:
# 'link_index' is the only reference we have if the link iface is in a namespace
lower = netns_ifindex_to_ifname(iface_in['link_index'])
if lower:
insert(iface_out, "infix-interfaces:vlan", "lower-layer-if", lower)
if 'flags' in iface_in:
iface_out['admin-status'] = "up" if "UP" in iface_in['flags'] else "down"
if 'operstate' in iface_in:
xlate = {
"DOWN": "down",
"UP": "up",
"DORMANT": "dormant",
"TESTING": "testing",
"LOWERLAYERDOWN": "lower-layer-down",
"NOTPRESENT": "not-present"
}
val = xlate.get(iface_in['operstate'], "unknown")
iface_out['oper-status'] = val
if 'link_type' in iface_in:
val = json_get_yang_type(iface_in)
iface_out['type'] = val
add_gre(iface_in, iface_out)
val = lookup(iface_in, "stats64", "rx", "bytes")
if val is not None:
insert(iface_out, "statistics", "out-octets", str(val))
val = lookup(iface_in, "stats64", "tx", "bytes")
if val is not None:
insert(iface_out, "statistics", "in-octets", str(val))
def add_ip_addr(ifname, iface_in, iface_out):
if 'mtu' in iface_in and ifname != "lo":
insert(iface_out, "ietf-ip:ipv4", "mtu", iface_in['mtu'])
val = HOST.read(f"/proc/sys/net/ipv6/conf/{ifname}/mtu")
if val is not None:
insert(iface_out, "ietf-ip:ipv6", "mtu", int(val.strip()))
if 'addr_info' in iface_in:
inet = []
inet6 = []
for addr in iface_in['addr_info']:
new = {}
if 'family' not in addr:
LOG.error("'family' missing from 'addr_info'")
continue
if 'local' in addr:
new['ip'] = addr['local']
if 'prefixlen' in addr:
new['prefix-length'] = addr['prefixlen']
if 'protocol' in addr:
new['origin'] = json_get_yang_origin(addr)
if addr['family'] == "inet":
inet.append(new)
elif addr['family'] == "inet6":
inet6.append(new)
else:
LOG.error("invalid 'family' in 'addr_info'")
sys.exit(1)
insert(iface_out, "ietf-ip:ipv4", "address", inet)
insert(iface_out, "ietf-ip:ipv6", "address", inet6)
def add_ethtool_groups(ifname, iface_out):
"""Fetch interface counters from kernel (need new JSON format!)"""
cmd = ['ethtool', '--json', '-S', ifname, '--all-groups']
try:
data = HOST.run_json(cmd)
if len(data) != 1:
LOG.warning("%s: no counters available, skipping.", ifname)
return
except subprocess.CalledProcessError:
# Allow comand to fail, not all NICs support --json yet
return
iface_in = data[0]
# TODO: room for improvement, the "frame" creation could be more dynamic.
if "eth-mac" in iface_in or "rmon" in iface_in:
insert(iface_out, "ieee802-ethernet-interface:ethernet", "statistics", "frame", {})
frame = iface_out['ieee802-ethernet-interface:ethernet']['statistics']['frame']
if "eth-mac" in iface_in:
mac_in = iface_in['eth-mac']
if "FramesTransmittedOK" in mac_in:
frame['out-frames'] = str(mac_in['FramesTransmittedOK'])
if "MulticastFramesXmittedOK" in mac_in:
frame['out-multicast-frames'] = str(mac_in['MulticastFramesXmittedOK'])
if "BroadcastFramesXmittedOK" in mac_in:
frame['out-broadcast-frames'] = str(mac_in['BroadcastFramesXmittedOK'])
if "FramesReceivedOK" in mac_in:
frame['in-frames'] = str(mac_in['FramesReceivedOK'])
if "MulticastFramesReceivedOK" in mac_in:
frame['in-multicast-frames'] = str(mac_in['MulticastFramesReceivedOK'])
if "BroadcastFramesReceivedOK" in mac_in:
frame['in-broadcast-frames'] = str(mac_in['BroadcastFramesReceivedOK'])
if "FrameCheckSequenceErrors" in mac_in:
frame['in-error-fcs-frames'] = str(mac_in['FrameCheckSequenceErrors'])
if "FramesLostDueToIntMACRcvError" in mac_in:
frame['in-error-mac-internal-frames'] = str(mac_in['FramesLostDueToIntMACRcvError'])
if "OctetsTransmittedOK" in mac_in:
frame['infix-ethernet-interface:out-good-octets'] = str(mac_in['OctetsTransmittedOK'])
if "OctetsReceivedOK" in mac_in:
frame['infix-ethernet-interface:in-good-octets'] = str(mac_in['OctetsReceivedOK'])
tot = 0
found = False
if "FramesReceivedOK" in mac_in:
tot += mac_in['FramesReceivedOK']
found = True
if "FrameCheckSequenceErrors" in mac_in:
tot += mac_in['FrameCheckSequenceErrors']
found = True
if "FramesLostDueToIntMACRcvError" in mac_in:
tot += mac_in['FramesLostDueToIntMACRcvError']
found = True
if "AlignmentErrors" in mac_in:
tot += mac_in['AlignmentErrors']
found = True
if "etherStatsOversizePkts" in mac_in:
tot += mac_in['etherStatsOversizePkts']
found = True
if "etherStatsJabbers" in mac_in:
tot += mac_in['etherStatsJabbers']
found = True
if found:
frame['in-total-frames'] = str(tot)
if "rmon" in iface_in:
rmon_in = iface_in['rmon']
if "undersize_pkts" in rmon_in:
frame['in-error-undersize-frames'] = str(rmon_in['undersize_pkts'])
tot = 0
found = False
if "etherStatsJabbers" in rmon_in:
tot += rmon_in['etherStatsJabbers']
found = True
if "etherStatsOversizePkts" in rmon_in:
tot += rmon_in['etherStatsOversizePkts']
found = True
if found:
frame['in-error-oversize-frames'] = str(tot)
def add_ethtool_std(ifname, iface_out):
"""Fetch interface speed/duplex/autoneg from kernel"""
keys = ['Speed', 'Duplex', 'Auto-negotiation']
result = {}
lines = HOST.run_multiline(['ethtool', ifname])
for line in lines:
line = line.strip()
key = line.split(':', 1)[0].strip()
if key in keys:
key, value = line.split(':', 1)
result[key.strip()] = value.strip()
if "Auto-negotiation" in result:
if result['Auto-negotiation'] == "on":
insert(iface_out, "ieee802-ethernet-interface:ethernet", "auto-negotiation", "enable", True)
else:
insert(iface_out, "ieee802-ethernet-interface:ethernet", "auto-negotiation", "enable", False)
if "Duplex" in result:
if result['Duplex'] == "Half":
insert(iface_out, "ieee802-ethernet-interface:ethernet", "duplex", "half")
elif result['Duplex'] == "Full":
insert(iface_out, "ieee802-ethernet-interface:ethernet", "duplex", "full")
else:
insert(iface_out, "ieee802-ethernet-interface:ethernet", "duplex", "unknown")
if "Speed" in result and result['Speed'] != "Unknown!":
# Avoid importing re (performance)
num = ''.join(filter(str.isdigit, result['Speed']))
if num:
num = round((int(num) / 1000), 3)
insert(iface_out, "ieee802-ethernet-interface:ethernet", "speed", str(num))
def get_querier_data(querier_data):
multicast={}
if not querier_data:
multicast["snooping"] = False
return multicast
multicast["snooping"] = True
if(querier_data.get("query-interval")):
multicast["query-interval"] = querier_data["query-interval"]
return multicast
def get_multicast_filters(filters):
multicast_filters=[]
for f in filters:
multicast_filter={}
multicast_filter["group"] = f["group"]
multicast_filter["ports"] = []
for p in f["ports"]:
port={}
port["port"] = p
multicast_filter["ports"].append(port)
multicast_filters.append(multicast_filter)
return multicast_filters
def add_mdb_to_bridge(brname, iface_out, mc_status):
filters = [entry for entry in mc_status.get("multicast-groups", []) if entry.get('vid') == None and entry.get('bridge') == brname]
querier = next((querier for querier in mc_status.get('multicast-queriers', []) if (querier.get("interface", "") == brname) and (querier.get("vid") is None)), None)
multicast = get_querier_data(querier)
multicast_filters = get_multicast_filters(filters)
insert(iface_out, "infix-interfaces:bridge", "multicast", multicast)
insert(iface_out, "infix-interfaces:bridge", "multicast-filters", "multicast-filter", multicast_filters)
def add_container_ifaces(yang_ifaces):
"""Add all podman interfaces with limited data"""
interfaces={}
try:
containers = HOST.run_json(['podman', 'ps', '-a', '--format=json'], default=[])
except Exception as e:
logging.error(f"Error, unable to run podman: {e}")
return
for container in containers:
name = container.get('Names', ['Unknown'])[0]
networks = container.get('Networks', [])
for network in networks:
if not network in interfaces:
interfaces[network] = []
if name not in interfaces[network]:
interfaces[network].append(name)
for ifname, containers in interfaces.items():
iface_out = {}
iface_out['name'] = ifname
iface_out['type'] = "infix-if-type:other" # Fallback
insert(iface_out, "infix-interfaces:container-network", "containers", containers)
netns = netns_find_ifname(ifname)
if netns is not None:
ip_link_data = netns_get_ip_link(netns)
ip_link_data = next((d for d in ip_link_data if d.get('ifalias') == ifname), None)
add_ip_link(ifname, ip_link_data, iface_out)
yang_ifaces.append(iface_out)
# Helper function to add tagged/untagged interfaces to a vlan dict in a list
def _add_vlan_iface(vlans, multicast_filter, multicast, vid, key, val):
for d in vlans:
if d['vid'] == vid:
if key in d:
d[key].append(val)
else:
d[key] = [val]
return
vlans.append({'vid': vid, "multicast-filters": {"multicast-filter": multicast_filter}, "multicast": multicast, key: [val]})
def add_vlans_to_bridge(brname, iface_out, mc_status):
slaves = [] # Contains all interfaces that has this bridge as 'master'
for iface in HOST.run_json(['bridge', '-j', 'link']):
if "master" in iface and iface['master'] == brname:
slaves.append(iface['ifname'])
vlans = [] # Contains all vlans and slaves belonging to this bridge
for iface in HOST.run_json(['bridge', '-j', 'vlan']):
if iface['ifname'] not in slaves and iface['ifname'] != brname:
continue
for vlan in iface['vlans']:
querier = next((querier for querier in mc_status.get('multicast-queriers', []) if (querier.get("vid") == vlan['vlan'])), None)
filters = [entry for entry in mc_status.get("multicast-groups", []) if (entry.get("vid") == vlan["vlan"])]
if 'flags' in vlan and 'Egress Untagged' in vlan['flags']:
_add_vlan_iface(vlans, get_multicast_filters(filters), get_querier_data(querier), vlan['vlan'], 'untagged', iface['ifname'])
else:
_add_vlan_iface(vlans, get_multicast_filters(filters), get_querier_data(querier), vlan['vlan'], 'tagged', iface['ifname'])
insert(iface_out, "infix-interfaces:bridge", "vlans", "vlan", vlans)
def get_iface_data(ifname, ip_link_data, ip_addr_data):
iface_out = {}
add_ip_link(ifname, ip_link_data, iface_out)
add_ip_addr(ifname, ip_addr_data, iface_out)
if 'type' in iface_out and iface_out['type'] == "infix-if-type:ethernet":
add_ethtool_groups(ifname, iface_out)
add_ethtool_std(ifname, iface_out)
if 'type' in iface_out and iface_out['type'] == "infix-if-type:bridge":
# Fail silent, multicast snooping may not be enabled on bridge
mc_status = HOST.run_json(['mctl', '-p', 'show', 'igmp', 'json'], default={})
add_vlans_to_bridge(ifname, iface_out, mc_status)
add_mdb_to_bridge(ifname, iface_out, mc_status)
return iface_out
def _add_interface(ifname, ip_link_data, ip_addr_data, yang_ifaces):
# We expect both ip addr and link data to exist.
if not ip_link_data or not ip_addr_data:
return
# Skip internal interfaces.
if 'group' in ip_link_data and ip_link_data['group'] == "internal":
return
yang_ifaces.append(get_iface_data(ifname, ip_link_data, ip_addr_data))
from . import container
from . import link
def operational(ifname=None):
out = {
return {
"ietf-interfaces:interfaces": {
"interface": []
}
"interface":
link.interfaces(ifname) +
container.interfaces(ifname),
},
}
out_ifaces = out["ietf-interfaces:interfaces"]["interface"]
ip_link_data = get_ip_link()
ip_addr_data = get_ip_addr()
if ifname:
ip_link_data = next((d for d in ip_link_data if d.get('ifname') == ifname), None)
ip_addr_data = next((d for d in ip_addr_data if d.get('ifname') == ifname), None)
_add_interface(ifname, ip_link_data, ip_addr_data, out_ifaces)
else:
for link in ip_link_data:
addr = next((d for d in ip_addr_data if d.get('ifname') == link["ifname"]), None)
_add_interface(link["ifname"], link, addr, out_ifaces)
add_container_ifaces(out_ifaces)
return out
@@ -0,0 +1,171 @@
from functools import cache
from ..common import LOG
from ..host import HOST
from .common import iplinks, iplinks_lower_of
from . import vlan
@cache
def bridge_vlan():
return { v["ifname"]: v for v in HOST.run_json("bridge -j vlan show".split(), []) }
def lower(iplink):
lower = {}
if brpvlans := bridge_vlan().get(iplink["ifname"]):
for brpvlan in brpvlans["vlans"]:
if "PVID" in brpvlan.get("flags", []):
lower["pvid"] = brpvlan["vlan"]
if iplink.get("linkinfo", {}).get("info_kind") == "bridge":
return lower
info = iplink["linkinfo"]["info_slave_data"]
return lower | {
"bridge": iplink["master"],
"flood": {
"broadcast": info["bcast_flood"],
"unicast": info["flood"],
"multicast": info["mcast_flood"],
},
"multicast": {
"fast-leave": info["fastleave"],
"router": {
0: "off",
1: "auto",
2: "permanent",
}.get(info["multicast_router"], "UNKNOWN"),
},
"stp-state": info["state"],
}
def mctlq2yang_mode(mctlq):
if state := mctlq.get("state"):
return "proxy" if state == "proxy" else "auto"
return "off"
def mctl(ifname, vid):
mctl = HOST.run_json(["mctl", "-p", "show", "igmp", "json"], default={})
for q in mctl.get("multicast-queriers", []):
# TODO: Also need to match against VLAN uppers (e.g. br0.1337)
if q.get("interface") == ifname and q.get("vid") == vid:
return q
return {}
def multicast_filters(iplink, vid):
filt = ["dev", iplink["ifname"]] + (["vid", str(vid)] if vid else [])
brmdb = HOST.run_json(["bridge", "-j", "mdb", "show"] + filt)[0]["mdb"]
mdb = {}
for brentry in brmdb:
if not (entry := mdb.get(brentry["grp"])):
mdb[brentry["grp"]] = {
"group": brentry["grp"],
"ports": [],
}
entry = mdb[brentry["grp"]]
entry["ports"].append({
"port": brentry["port"],
"state": {
"temp": "temporary",
"permanent": "permanent"
}.get(brentry["state"], "UNKNOWN"),
})
return { "multicast-filter": list(mdb.values()) }
def multicast(iplink, info):
mctlq = mctl(iplink["ifname"], info.get("vlan"))
mcast = {
"snooping": bool(info.get("mcast_snooping")),
"querier": mctlq2yang_mode(mctlq),
}
if interval := mctlq.get("interval"):
mcast["query-interval"] = interval
return mcast
def vlans_add_memberships(iplink, vlans):
brvlans = bridge_vlan()
ports = [iplink["ifname"]] + [link["ifname"] for link in iplinks_lower_of(iplink["ifname"]).values()]
for port in ports:
if not (brpvlans := brvlans.get(port)):
continue
for brpvlan in brpvlans["vlans"]:
if not (vlan := vlans.get(brpvlan["vlan"])):
LOG.error(f"Unexpected vlan {brpvlans['vlan']} on {port}")
continue
if "Egress Untagged" in brpvlan.get("flags", []):
vlan["untagged"].append(port)
else:
vlan["tagged"].append(port)
def vlans(iplink):
if not (brgvlans := HOST.run_json(f"bridge -j vlan global show dev {iplink['ifname']}".split())):
return []
vlans = {
v["vlan"]: {
"vid": v["vlan"],
"untagged": [],
"tagged": [],
"multicast": multicast(iplink, v),
"multicast-filters": multicast_filters(iplink, v["vlan"]),
}
for v in brgvlans[0]["vlans"]
}
vlans_add_memberships(iplink, vlans)
return list(vlans.values())
def qbridge(iplink):
info = iplink["linkinfo"]["info_data"]
return {
"vlans": {
"proto": vlan.proto2yang(info["vlan_protocol"]),
"vlan": vlans(iplink),
}
}
def dbridge(iplink):
info = iplink["linkinfo"]["info_data"]
return {
"multicast": multicast(iplink, info),
"multicast-filters": multicast_filters(iplink, None),
}
def bridge(iplink):
info = iplink["linkinfo"]["info_data"]
if info.get("vlan_filtering"):
return qbridge(iplink)
else:
return dbridge(iplink)
@@ -0,0 +1,30 @@
from functools import cache
from ..host import HOST
@cache
def iplinks(ifname=None, netns=None):
def _iplinks(ifname, netns):
pre = [ "ip", "netns", "exec", netns ] if netns else []
filt = ["dev", ifname] if ifname else []
return HOST.run_json(pre + ["ip", "-s", "-d", "-j", "link", "show"] + filt)
return { link["ifname"]: link for link in _iplinks(ifname, netns) }
def iplinks_lower_of(upper):
return {
link["ifname"]: link for link in
filter(lambda link: link.get("master") == upper, iplinks().values())
}
@cache
def ipaddrs(ifname=None, netns=None):
def _ipaddrs(ifname, netns):
pre = [ "ip", "netns", "exec", netns ] if netns else []
filt = ["dev", ifname] if ifname else []
return HOST.run_json(pre + ["ip", "-j", "addr", "show"] + filt)
return { addr["ifname"]: addr for addr in _ipaddrs(ifname, netns) }
@@ -0,0 +1,57 @@
from ..host import HOST
from ..infix_containers import podman_ps
from . import common
from . import link
def ip_netns_list():
return HOST.run_json(["ip", "-j", "netns", "list"], [])
def find_interface(cifname):
for ns in ip_netns_list():
for iplink in common.iplinks(netns=ns["name"]).values():
if iplink.get("ifalias") == cifname:
ipaddrs = common.ipaddrs(ifname=iplink["ifname"], netns=ns["name"])
return (iplink, next(iter(ipaddrs.values())))
def podman_interfaces():
interfaces = {}
for container in podman_ps():
containername = container.get("Names", ["Unknown"])[0]
for ifname in container.get("Networks", []):
if ifname not in interfaces:
interfaces[ifname] = []
if containername not in interfaces[ifname]:
interfaces[ifname].append(containername)
return interfaces
def interfaces(ifname):
interfaces = []
for cifname, cnames in podman_interfaces().items():
if ifname and cifname != ifname:
continue
iplink, ipaddr = find_interface(cifname)
interface = link.interface_common(iplink, ipaddr)
# The original interface name is stored in ifalias by podman -
# which we then translate to the description. We need to
# reverse these since the "name" from the user's perspective
# is the one set in running-config, not whatever the container
# has renamed it to.
interface["description"] = interface["name"]
interface["name"] = cifname
interface["infix-interfaces:container-network"] = {
"containers": cnames,
}
interfaces.append(interface)
return interfaces
@@ -0,0 +1,110 @@
from ..host import HOST
def frame_statistics(etstats):
STAT_MAP = {
"eth-mac": {
"out-frames": "FramesTransmittedOK",
"out-multicast-frames": "MulticastFramesXmittedOK",
"out-broadcast-frames": "BroadcastFramesXmittedOK",
"in-frames": "FramesReceivedOK",
"in-multicast-frames": "MulticastFramesReceivedOK",
"in-broadcast-frames": "BroadcastFramesReceivedOK",
"in-error-fcs-frames": "FrameCheckSequenceErrors",
"in-error-mac-internal-frames": "FramesLostDueToIntMACRcvError",
"infix-ethernet-interface:out-good-octets": "OctetsTransmittedOK",
"infix-ethernet-interface:in-good-octets": "OctetsReceivedOK",
"in-total-frames": (
"FramesReceivedOK",
"FrameCheckSequenceErrors",
"FramesLostDueToIntMACRcvError",
"AlignmentErrors",
"etherStatsOversizePkts",
"etherStatsJabbers",
),
},
"rmon": {
"in-error-undersize-frames": "undersize_pkts",
"in-error-oversize-frames": (
"etherStatsJabbers",
"etherStatsOversizePkts",
),
},
}
fstats = {}
for group, mapping in STAT_MAP.items():
etgroup = etstats.get(group)
if not etgroup:
continue
for name, source in mapping.items():
if type(source) == str:
counter = etgroup.get(source)
if counter is not None:
fstats[name] = str(counter)
elif type(source) == tuple:
inputs = [etgroup.get(src) for src in source]
if inputs := filter(lambda i: i is not None, inputs):
fstats[name] = str(sum(inputs))
return fstats
def statistics(ifname):
if etstats := HOST.run_json(["ethtool", "--json", "-S", ifname, "--all-groups"], []):
etstats = etstats[0]
else:
return None
statistics = {}
if fstats := frame_statistics(etstats):
statistics["frame"] = fstats
return statistics
def link(ethtool):
"""Parse speed/duplex/autoneg from ethtool output"""
eth = {}
for line in ethtool:
kv = [s.strip() for s in line.split(":")]
if len(kv) != 2:
continue
key, val = kv
match key:
case "Auto-negotiation":
eth["auto-negotiation"] = { "enable": val == "on" }
case "Duplex":
match val:
case "Half":
eth["duplex"] = "half"
case "Full":
eth["duplex"] = "full"
case _:
eth["duplex"] = "unknown"
case "Speed":
mbps = "".join(filter(str.isdigit, val))
if mbps:
gbps = round((int(mbps) / 1000), 3)
eth["speed"] = str(gbps)
return eth
def ethernet(iplink):
ethtool = HOST.run_multiline(["ethtool", iplink["ifname"]])
eth = link(ethtool)
if stats := statistics(iplink["ifname"]):
eth["statistics"] = stats
return eth
@@ -0,0 +1,56 @@
from ..host import HOST
def inet2yang_origin(inet):
"""Translate kernel IP address origin to YANG"""
xlate = {
"kernel_ll": "link-layer",
"kernel_ra": "link-layer",
"static": "static",
"dhcp": "dhcp",
"random": "random",
}
proto = inet.get("protocol")
if proto in ("kernel_ll", "kernel_ra"):
if "stable-privacy" in inet:
return "random"
return xlate.get(proto, "other")
def addresses(ipaddr, proto):
addrs = []
for inet in ipaddr.get("addr_info", []):
if inet.get("family") != proto:
continue
addrs.append({
"ip": inet.get("local"),
"prefix-length": inet.get("prefixlen"),
"origin": inet2yang_origin(inet),
})
return addrs
def ipv4(ipaddr):
ipv4 = {}
mtu = ipaddr.get("mtu")
if mtu and ipaddr.get("ifname") != "lo":
ipv4["mtu"] = mtu
if addrs := addresses(ipaddr, "inet"):
ipv4["address"] = addrs
return ipv4
def ipv6(ipaddr):
ipv6 = {}
if mtu := HOST.read(f"/proc/sys/net/ipv6/conf/{ipaddr['ifname']}/mtu"):
ipv6["mtu"] = int(mtu.strip())
if addrs := addresses(ipaddr, "inet6"):
ipv6["address"] = addrs
return ipv6
@@ -0,0 +1,158 @@
from . import common
from . import bridge
from . import ethernet
from . import ip
from . import tun
from . import veth
from . import vlan
def statistics(iplink):
statistics = {}
if rx := iplink.get("stats64", {}).get("rx"):
if octets := rx.get("bytes"):
statistics["in-octets"] = str(octets)
if tx := iplink.get("stats64", {}).get("tx"):
if octets := tx.get("bytes"):
statistics["out-octets"] = str(octets)
return statistics
def iplink2yang_type(iplink):
match iplink["link_type"]:
case "loopback":
return "infix-if-type:loopback"
case "gre"|"gre6":
return "infix-if-type:gre"
case "ether":
pass
case _:
return "infix-if-type:other"
if iplink.get("parentbus") == "virtio":
return "infix-if-type:etherlike"
match iplink.get("linkinfo", {}).get("info_kind"):
case "bond":
return "infix-if-type:lag"
case "bridge":
return "infix-if-type:bridge"
case "dummy":
return "infix-if-type:dummy"
case "gretap"|"ip6gretap":
return "infix-if-type:gretap"
case "veth":
return "infix-if-type:veth"
case "vlan":
return "infix-if-type:vlan"
return "infix-if-type:ethernet"
def iplink2yang_lower(iplink):
if not (kind := iplink.get("linkinfo",{}).get("info_slave_kind")):
return None
match kind:
case "bridge":
return "infix-interfaces:bridge-port"
case "bond":
return "infix-interfaces:lag-port"
return None
def iplink2yang_operstate(iplink):
xlate = {
"DOWN": "down",
"UP": "up",
"DORMANT": "dormant",
"TESTING": "testing",
"LOWERLAYERDOWN": "lower-layer-down",
"NOTPRESENT": "not-present"
}
return xlate.get(iplink["operstate"], "unknown")
def interface_common(iplink, ipaddr):
interface = {
"type": iplink2yang_type(iplink),
"name": iplink.get("ifname"),
"if-index": iplink.get("ifindex"),
"admin-status": "up" if "UP" in iplink.get("flags", "") else "down",
"oper-status": iplink2yang_operstate(iplink),
}
if "ifalias" in iplink:
interface["description"] = iplink["ifalias"]
if "address" in iplink and not "POINTOPOINT" in iplink["flags"]:
interface["phys-address"] = iplink["address"]
if stats := statistics(iplink):
interface["statistics"] = stats
if ipv4 := ip.ipv4(ipaddr):
interface["ietf-ip:ipv4"] = ipv4
if ipv6 := ip.ipv6(ipaddr):
interface["ietf-ip:ipv6"] = ipv6
return interface
def interface(iplink, ipaddr):
interface = interface_common(iplink, ipaddr)
match interface["type"]:
case "infix-if-type:bridge":
if br := bridge.bridge(iplink):
interface["infix-interfaces:bridge"] = br
if brport := bridge.lower(iplink):
interface["infix-interfaces:bridge-port"] = brport
# case "infix-if-type:lag":
# if l := lag.lag(iplink):
# interface["infix-interfaces:lag"] = l
case "infix-if-type:ethernet":
if eth := ethernet.ethernet(iplink):
interface["ieee802-ethernet-interface:ethernet"] = eth
case "infix-if-type:gre"|"infix-if-type:gretap":
if gre := tun.gre(iplink):
interface["infix-interfaces:gre"] = gre
case "infix-if-type:veth":
if ve := veth.veth(iplink):
interface["infix-interfaces:veth"] = ve
case "infix-if-type:vlan":
if v := vlan.vlan(iplink):
interface["infix-interfaces:vlan"] = v
match iplink2yang_lower(iplink):
case "infix-interfaces:bridge-port":
if brport := bridge.lower(iplink):
interface["infix-interfaces:bridge-port"] = brport
# case "infix-interfaces:lag-port":
# if lagport := lag.lower(iplink):
# interface["infix-interfaces:lag-port"] = lagport
return interface
def interfaces(ifname=None):
links = common.iplinks(ifname)
addrs = common.ipaddrs(ifname)
interfaces = []
for ifname, iplink in links.items():
if iplink.get("group") == "internal":
continue
ipaddr = addrs.get(ifname, {})
interfaces.append(interface(iplink, ipaddr))
return interfaces
@@ -0,0 +1,7 @@
def gre(iplink):
info=iplink.get("linkinfo", {}).get("info_data", {})
return {
"local": info["local"],
"remote": info["remote"],
}
@@ -0,0 +1,7 @@
def veth(iplink):
veth = {}
if peer := iplink.get("link"):
veth["peer"] = peer
return veth
@@ -0,0 +1,21 @@
def proto2yang(proto):
return {
"802.1Q": "ieee802-dot1q-types:c-vlan",
"802.1ad": "ieee802-dot1q-types:s-vlan",
}.get(proto, "other")
def vlan(iplink):
info = iplink["linkinfo"]["info_data"]
vlan = {
"tag-type": proto2yang(info["protocol"]),
"id": info["id"],
}
# Lower could be in a different namespace, and thus might not be
# available to us
if lower := iplink.get("link"):
vlan["lower-layer-if"] = lower
return vlan
+10 -4
View File
@@ -1,9 +1,15 @@
---
# Tests in this suite can be run on localhost without a target environment
- name: cli-output
suite: cli/all.yaml
- name: statd-yanger
suite: statd/all.yaml
opts:
- yanger
- check
- name: cli-pretty
suite: cli_pretty/all.yaml
- name: statd-cli
suite: statd/all.yaml
opts:
- cli
- check
-3
View File
@@ -1,3 +0,0 @@
---
- case: run.sh
name: "cli-check-output"
@@ -1,7 +0,0 @@
BRIDGE VID GROUP PORTS 
br0 230.1.32.100 e0
br0 230.1.2.100 e1
br0 01:01:01:01:01:01 e1
br0 230.1.2.2 e0
br1 30 ff02::6a e2
br1 30 224.2.2.2 e2
@@ -1,9 +0,0 @@
name : br0
index : 7
mtu : 1500
operational status : up
physical address : 02:00:00:00:00:00
ipv4 addresses :
ipv6 addresses :
in-octets : 0
out-octets : 3158
@@ -1,24 +0,0 @@
name : e0
index : 2
mtu : 1500
operational status : up
auto-negotiation : on
duplex : full
speed : 10000
physical address : 02:00:00:00:00:00
ipv4 addresses :
ipv6 addresses :
in-octets : 20891
out-octets : 6537
eth-out-frames : 713
eth-out-multicast-frames : 605
eth-out-broadcast-frames : 69
eth-in-frames : 418
eth-in-multicast-frames : 336
eth-in-broadcast-frames : 46
eth-in-error-fcs-frames : 0
eth-out-good-octets : 129130
eth-in-good-octets : 72571
eth-in-total-frames : 418
eth-in-error-oversize-frames : 0
@@ -1,24 +0,0 @@
name : e1
index : 3
mtu : 1500
operational status : up
auto-negotiation : on
duplex : full
speed : 10000
physical address : 02:00:00:00:00:01
ipv4 addresses :
ipv6 addresses :
in-octets : 24849
out-octets : 1397
eth-out-frames : 713
eth-out-multicast-frames : 605
eth-out-broadcast-frames : 69
eth-in-frames : 418
eth-in-multicast-frames : 336
eth-in-broadcast-frames : 46
eth-in-error-fcs-frames : 0
eth-out-good-octets : 129130
eth-in-good-octets : 72571
eth-in-total-frames : 418
eth-in-error-oversize-frames : 0
@@ -1,9 +0,0 @@
name : e2
index : 4
mtu : 1500
operational status : up
physical address : 02:00:00:00:00:02
ipv4 addresses :
ipv6 addresses : fe80::ff:fe00:2/64 (link-layer)
in-octets : 19114
out-octets : 0
@@ -1,9 +0,0 @@
name : e3
index : 5
mtu : 1500
operational status : up
physical address : 02:00:00:00:00:03
ipv4 addresses :
ipv6 addresses :
in-octets : 15057
out-octets : 1327
@@ -1,9 +0,0 @@
name : e4
index : 6
mtu : 1500
operational status : down
physical address : 02:00:00:00:00:04
ipv4 addresses :
ipv6 addresses :
in-octets : 19022
out-octets : 1327
@@ -1,16 +0,0 @@
INTERFACE PROTOCOL STATE DATA 
br0 bridge  vlan:40u,50t pvid:1
│ ethernet UP 02:00:00:00:00:00
├ e0 bridge DISABLED vlan:10u,20t pvid:10
└ e1 bridge BLOCKING vlan:10t,20u pvid:20
br1 bridge  
│ ethernet UP 02:00:00:00:00:02
└ e2 bridge FORWARDING vlan:30u pvid:30
e2 container system 
e3 ethernet UP 02:00:00:00:00:03
e4 ethernet DOWN 02:00:00:00:00:04
veth0b container system 
veth0j ethernet UP b2:82:e3:ce:d5:9e
veth peer:veth0k
ipv4 192.168.1.1/24 (static)
veth0k container system2 
-9
View File
@@ -1,9 +0,0 @@
ADDRESS MODE STATE STRATUM POLL-INTERVAL
185.125.190.56 peer candidate 2 8
185.125.190.58 server unstable 2 7
185.125.190.57 server falseticker 2 8
91.189.91.157 local-clock outlier 2 6
192.121.108.100 server candidate 3 8
85.24.237.72 server selected 2 8
162.159.200.1 server unusable 3 7
85.24.237.71 server candidate 2 8
@@ -1,11 +0,0 @@
 DESTINATION PREF NEXT-HOP PROTO UPTIME
>* 0.0.0.0/0 110/2 10.0.23.1 ospfv2 00:00:00
>* 10.0.0.1/32 110/4000 10.0.13.1 ospfv2 00:00:00
10.0.0.3/32 110/0 lo ospfv2 00:00:00
>* 10.0.0.3/32 0/0 lo direct 00:00:00
10.0.13.0/30 110/2000 e5 ospfv2 00:00:00
>* 10.0.13.0/30 0/0 e5 direct 00:00:00
10.0.23.0/30 110/1 e6 ospfv2 00:00:00
>* 10.0.23.0/30 0/0 e6 direct 20:10:05
192.168.3.0/24 110/1 e2 ospfv2 5d13h05m
>* 192.168.3.0/24 0/0 e2 direct 01w1d13h
@@ -1,11 +0,0 @@
 DESTINATION PREF NEXT-HOP PROTO UPTIME
>* ::/0 1/0 2001:db8:3c4d:50::1 static 00:00:00
>* 2001:db8:3c4d:50::/64 0/0 e6 direct 00:00:00
>* 2001:db8:3c4d:200::1/128 0/0 lo direct 00:00:00
* fe80::/64 0/0 e7 direct 00:00:00
* fe80::/64 0/0 e6 direct 00:00:00
* fe80::/64 0/0 e5 direct 00:00:00
* fe80::/64 0/0 e4 direct 00:00:00
* fe80::/64 0/0 e3 direct 00:00:00
* fe80::/64 0/0 e2 direct 00:00:00
>* fe80::/64 0/0 e1 direct 00:00:00
@@ -1,6 +0,0 @@
BOOT ORDER
net primary secondary
NAME STATE VERSION DATE 
secondary inactive pr873.2a39a38 2024-12-16T14:40:54Z
primary inactive pr871.a4ef38f 2024-12-13T20:00:42Z
-144
View File
@@ -1,144 +0,0 @@
#!/bin/sh
SCRIPT_PATH="$(dirname "$(readlink -f "$0")")"
ROOT_PATH="$SCRIPT_PATH/../../../"
CLI_OUTPUT_PATH="$SCRIPT_PATH/cli-output/"
CLI_PRETTY_TOOL="$ROOT_PATH/src/statd/python/cli_pretty/cli_pretty.py"
SR_EMULATOR_TOOL="$SCRIPT_PATH/sysrepo-emulator.sh"
CLI_OUTPUT_FILE="$(mktemp)"
TEST=1
cleanup() {
rm -f "$CLI_OUTPUT_FILE"
}
trap cleanup EXIT
ok() {
echo "ok $TEST - $1"
TEST=$((TEST + 1))
}
fail() {
echo "not ok $TEST - $1"
exit 1
}
print_update_txt() {
echo
echo "# CLI output has changed. This might not be an error if you intentionally"
echo "# changed something in yanger or cli-pretty. If you did, you need to update"
echo "# the template file."
echo
echo "# Here's how you update the CLI output templates:"
echo "# $SCRIPT_PATH/run.sh update <cli-pretty command>"
echo
echo "# Check the result"
echo "# git diff"
echo
echo "# Then finish up by committing the new template"
echo
}
if [ ! -e "$CLI_PRETTY_TOOL" ]; then
echo "Error, cli-pretty tool not found"
exit 1
fi
if [ $# -eq 2 ] && [ $1 = "update" ]; then
if [ $2 = "show-interfaces" ]; then
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" > "$CLI_OUTPUT_PATH/show-interfaces.txt"
for iface in "br0" "e0" "e1" "e2" "e3" "e4"; do
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" -n "$iface" \
> "$CLI_OUTPUT_PATH/show-interface-${iface}.txt"
done
elif [ $2 = "show-routing-table" ]; then
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv4" > "$CLI_OUTPUT_PATH/show-routes-ipv4.txt"
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv6" > "$CLI_OUTPUT_PATH/show-routes-ipv6.txt"
elif [ $2 = "show-bridge-mdb" ]; then
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-bridge-mdb" > "$CLI_OUTPUT_PATH/show-bridge-mdb.txt"
elif [ $2 = "show-ntp" ]; then
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-ntp" > "$CLI_OUTPUT_PATH/show-ntp.txt"
elif [ $2 = "show-software" ]; then
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-software" > "$CLI_OUTPUT_PATH/show-software.txt"
else
echo "Unsupported cli-pretty command $2"
exit 1
fi
echo "All files updated. Check git diff and commit if they look OK"
exit 0
fi
echo "1..12"
echo "# Running:"
# Show interfaces
echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-interfaces"
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" > "$CLI_OUTPUT_FILE"
if ! diff -u "$CLI_OUTPUT_PATH/show-interfaces.txt" "$CLI_OUTPUT_FILE"; then
print_update_txt
fail "\"show interfaces\" output has changed"
fi
ok "\"show interfaces\" output looks intact"
echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-bridge-mdb"
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-bridge-mdb" > "$CLI_OUTPUT_FILE"
if ! diff -u "$CLI_OUTPUT_PATH/show-bridge-mdb.txt" "$CLI_OUTPUT_FILE"; then
print_update_txt
fail "\"show bridge mdb\" output has changed"
fi
ok "\"show bridge mdb\" output looks intact"
# Show NTP
echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-ntp"
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-ntp" > "$CLI_OUTPUT_FILE"
if ! diff -u "$CLI_OUTPUT_PATH/show-ntp.txt" "$CLI_OUTPUT_FILE"; then
print_update_txt
fail "\"show ntp\" output has changed"
fi
ok "\"show ntp\" output looks intact"
# Show software
echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-software"
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-software" > "$CLI_OUTPUT_FILE"
if ! diff -u "$CLI_OUTPUT_PATH/show-software.txt" "$CLI_OUTPUT_FILE"; then
print_update_txt
fail "\"show software\" output has changed"
fi
ok "\"show software\" output looks intact"
# Show ipv4 routes
echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL -t show-routing-table -i ipv4"
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv4" > "$CLI_OUTPUT_FILE"
if ! diff -u "$CLI_OUTPUT_PATH/show-routes-ipv4.txt" "$CLI_OUTPUT_FILE"; then
print_update_txt
fail "\"show routes ipv4\" output has changed"
fi
ok "\"show routes ipv4\" output looks intact"
# Show ipv6 routes
echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL -t show-routing-table -i ipv6"
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv6" > "$CLI_OUTPUT_FILE"
if ! diff -u "$CLI_OUTPUT_PATH/show-routes-ipv6.txt" "$CLI_OUTPUT_FILE"; then
print_update_txt
fail "\"show routes ipv6\" output has changed"
fi
ok "\"show routes ipv6\" output looks intact"
# Show detailed interfaces
for iface in "br0" "e0" "e1" "e2" "e3" "e4"; do
"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" -n "$iface" > "$CLI_OUTPUT_FILE"
if ! diff -u "$CLI_OUTPUT_PATH/show-interface-${iface}.txt" "$CLI_OUTPUT_FILE"; then
print_update_txt
fail "\"show interface name $iface\" output has changed"
fi
ok "\"show interface name $iface\" output looks intact"
done
-34
View File
@@ -1,34 +0,0 @@
#!/bin/sh
SCRIPT_PATH="$(dirname "$(readlink -f "$0")")"
ROOT_PATH="$SCRIPT_PATH/../../../"
YANGER_TOOL="$ROOT_PATH/src/statd/python/yanger/yanger"
INTERFACES_OUTPUT_FILE="$(mktemp)"
ROUTES_OUTPUT_FILE="$(mktemp)"
SYSTEM_OUTPUT_FILE="$(mktemp)"
cleanup() {
rm -f "$INTERFACES_OUTPUT_FILE"
rm -f "$ROUTES_OUTPUT_FILE"
rm -f "$SYSTEM_OUTPUT_FILE"
}
trap cleanup EXIT
if [ ! -e "$YANGER_TOOL" ]; then
echo "Error, yanger tool not found"
exit 1
fi
if ! "$YANGER_TOOL" "ietf-interfaces" \
-t "$SCRIPT_PATH/system-output/" >> "$INTERFACES_OUTPUT_FILE"; then
echo "Error, running yanger for interface $iface" >&2
exit 1
fi
$YANGER_TOOL "ietf-routing" -t "$SCRIPT_PATH/system-output/" > "$ROUTES_OUTPUT_FILE"
$YANGER_TOOL "ietf-system" -t "$SCRIPT_PATH/system-output/" > "$SYSTEM_OUTPUT_FILE"
# Merge all module files
jq -s '.[0] * .[1] * .[2]' $ROUTES_OUTPUT_FILE $INTERFACES_OUTPUT_FILE $SYSTEM_OUTPUT_FILE
File diff suppressed because one or more lines are too long
@@ -1,47 +0,0 @@
[
{
"ifindex": 2,
"ifname": "e0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"master": "br0",
"state": "disabled",
"priority": 32,
"cost": 100
},
{
"ifindex": 3,
"ifname": "e1",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"master": "br0",
"state": "blocking",
"priority": 32,
"cost": 100
},
{
"ifindex": 4,
"ifname": "e2",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"master": "br1",
"state": "forwarding",
"priority": 32,
"cost": 100
}
]
@@ -1,17 +0,0 @@
[
{
"ifindex": 2,
"ifname": "e0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"master": "br0",
"state": "disabled",
"priority": 32,
"cost": 100
}
]
@@ -1,17 +0,0 @@
[
{
"ifindex": 3,
"ifname": "e1",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"master": "br0",
"state": "blocking",
"priority": 32,
"cost": 100
}
]
@@ -1,17 +0,0 @@
[
{
"ifindex": 4,
"ifname": "e2",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"master": "br1",
"state": "forwarding",
"priority": 32,
"cost": 100
}
]
@@ -1,57 +0,0 @@
[
{
"ifname": "e0",
"vlans": [
{
"vlan": 10,
"flags": [
"PVID",
"Egress Untagged"
]
},
{
"vlan": 20
}
]
},
{
"ifname": "e1",
"vlans": [
{
"vlan": 10
},
{
"vlan": 20,
"flags": [
"PVID",
"Egress Untagged"
]
}
]
},
{
"ifname": "e2",
"vlans": [
{
"vlan": 30,
"flags": [
"Egress Untagged"
]
}
]
},
{
"ifname": "br0",
"vlans": [
{
"vlan": 40,
"flags": [
"Egress Untagged"
]
},
{
"vlan": 50
}
]
}
]
@@ -1 +0,0 @@
[{"ifname":"br0","vlans":[{"vlan":1,"flags":["PVID","Egress Untagged"]},{"vlan":33}]}]
@@ -1 +0,0 @@
[{"ifname":"br1","vlans":[]}]
@@ -1,17 +0,0 @@
[
{
"ifname": "e0",
"vlans": [
{
"vlan": 10,
"flags": [
"PVID",
"Egress Untagged"
]
},
{
"vlan": 20
}
]
}
]
@@ -1,17 +0,0 @@
[
{
"ifname": "e1",
"vlans": [
{
"vlan": 10
},
{
"vlan": 20,
"flags": [
"PVID",
"Egress Untagged"
]
}
]
}
]
@@ -1,14 +0,0 @@
[
{
"ifname": "e2",
"vlans": [
{
"vlan": 30,
"flags": [
"PVID",
"Egress Untagged"
]
}
]
}
]
@@ -1,8 +0,0 @@
=,+,185.125.190.56,2,8,377,166,0.005469983,0.005822986,0.033335429
^,~,185.125.190.58,2,7,377,37,0.003233160,0.003233160,0.028441129
^,x,185.125.190.57,2,8,377,167,-0.000418652,-0.000065722,0.027703809
#,-,91.189.91.157,2,6,377,488,0.000970410,0.001490889,0.077348366
^,+,192.121.108.100,3,8,377,101,0.005757879,0.006114979,0.024731735
^,*,85.24.237.72,2,8,377,37,0.006444688,0.006805896,0.017862743
^,?,162.159.200.1,3,7,377,34,-0.000447366,-0.000447366,0.009887429
^,+,85.24.237.71,2,8,377,169,0.003875532,0.004228305,0.015323908
@@ -1,61 +0,0 @@
[
{
"ifname": "e1",
"eth-phy": {},
"eth-mac": {
"FramesTransmittedOK": 713,
"SingleCollisionFrames": 0,
"MultipleCollisionFrames": 0,
"FramesReceivedOK": 418,
"FrameCheckSequenceErrors": 0,
"OctetsTransmittedOK": 129130,
"FramesWithDeferredXmissions": 0,
"LateCollisions": 0,
"OctetsReceivedOK": 72571,
"MulticastFramesXmittedOK": 605,
"BroadcastFramesXmittedOK": 69,
"FramesWithExcessiveDeferral": 0,
"MulticastFramesReceivedOK": 336,
"BroadcastFramesReceivedOK": 46
},
"eth-ctrl": {},
"rmon": {
"etherStatsUndersizePkts": 0,
"etherStatsOversizePkts": 0,
"etherStatsFragments": 0,
"etherStatsJabbers": 0,
"rx-pktsNtoM": [
{
"low": 64,
"high": 64,
"val": 12
},
{
"low": 65,
"high": 127,
"val": 603
},
{
"low": 128,
"high": 255,
"val": 168
},
{
"low": 256,
"high": 511,
"val": 348
},
{
"low": 512,
"high": 1023,
"val": 0
},
{
"low": 1024,
"high": 65535,
"val": 0
}
]
}
}
]
@@ -1,7 +0,0 @@
[ {
"ifname": "dsa0",
"eth-phy": {},
"eth-mac": {},
"eth-ctrl": {},
"rmon": {}
} ]
@@ -1,61 +0,0 @@
[
{
"ifname": "e0",
"eth-phy": {},
"eth-mac": {
"FramesTransmittedOK": 713,
"SingleCollisionFrames": 0,
"MultipleCollisionFrames": 0,
"FramesReceivedOK": 418,
"FrameCheckSequenceErrors": 0,
"OctetsTransmittedOK": 129130,
"FramesWithDeferredXmissions": 0,
"LateCollisions": 0,
"OctetsReceivedOK": 72571,
"MulticastFramesXmittedOK": 605,
"BroadcastFramesXmittedOK": 69,
"FramesWithExcessiveDeferral": 0,
"MulticastFramesReceivedOK": 336,
"BroadcastFramesReceivedOK": 46
},
"eth-ctrl": {},
"rmon": {
"etherStatsUndersizePkts": 0,
"etherStatsOversizePkts": 0,
"etherStatsFragments": 0,
"etherStatsJabbers": 0,
"rx-pktsNtoM": [
{
"low": 64,
"high": 64,
"val": 12
},
{
"low": 65,
"high": 127,
"val": 603
},
{
"low": 128,
"high": 255,
"val": 168
},
{
"low": 256,
"high": 511,
"val": 348
},
{
"low": 512,
"high": 1023,
"val": 0
},
{
"low": 1024,
"high": 65535,
"val": 0
}
]
}
}
]
@@ -1,61 +0,0 @@
[
{
"ifname": "e1",
"eth-phy": {},
"eth-mac": {
"FramesTransmittedOK": 713,
"SingleCollisionFrames": 0,
"MultipleCollisionFrames": 0,
"FramesReceivedOK": 418,
"FrameCheckSequenceErrors": 0,
"OctetsTransmittedOK": 129130,
"FramesWithDeferredXmissions": 0,
"LateCollisions": 0,
"OctetsReceivedOK": 72571,
"MulticastFramesXmittedOK": 605,
"BroadcastFramesXmittedOK": 69,
"FramesWithExcessiveDeferral": 0,
"MulticastFramesReceivedOK": 336,
"BroadcastFramesReceivedOK": 46
},
"eth-ctrl": {},
"rmon": {
"etherStatsUndersizePkts": 0,
"etherStatsOversizePkts": 0,
"etherStatsFragments": 0,
"etherStatsJabbers": 0,
"rx-pktsNtoM": [
{
"low": 64,
"high": 64,
"val": 12
},
{
"low": 65,
"high": 127,
"val": 603
},
{
"low": 128,
"high": 255,
"val": 168
},
{
"low": 256,
"high": 511,
"val": 348
},
{
"low": 512,
"high": 1023,
"val": 0
},
{
"low": 1024,
"high": 65535,
"val": 0
}
]
}
}
]
@@ -1,61 +0,0 @@
[
{
"ifname": "e2",
"eth-phy": {},
"eth-mac": {
"FramesTransmittedOK": 713,
"SingleCollisionFrames": 0,
"MultipleCollisionFrames": 0,
"FramesReceivedOK": 418,
"FrameCheckSequenceErrors": 0,
"OctetsTransmittedOK": 129130,
"FramesWithDeferredXmissions": 0,
"LateCollisions": 0,
"OctetsReceivedOK": 72571,
"MulticastFramesXmittedOK": 605,
"BroadcastFramesXmittedOK": 69,
"FramesWithExcessiveDeferral": 0,
"MulticastFramesReceivedOK": 336,
"BroadcastFramesReceivedOK": 46
},
"eth-ctrl": {},
"rmon": {
"etherStatsUndersizePkts": 0,
"etherStatsOversizePkts": 0,
"etherStatsFragments": 0,
"etherStatsJabbers": 0,
"rx-pktsNtoM": [
{
"low": 64,
"high": 64,
"val": 12
},
{
"low": 65,
"high": 127,
"val": 603
},
{
"low": 128,
"high": 255,
"val": 168
},
{
"low": 256,
"high": 511,
"val": 348
},
{
"low": 512,
"high": 1023,
"val": 0
},
{
"low": 1024,
"high": 65535,
"val": 0
}
]
}
}
]
@@ -1,61 +0,0 @@
[
{
"ifname": "e3",
"eth-phy": {},
"eth-mac": {
"FramesTransmittedOK": 713,
"SingleCollisionFrames": 0,
"MultipleCollisionFrames": 0,
"FramesReceivedOK": 418,
"FrameCheckSequenceErrors": 0,
"OctetsTransmittedOK": 129130,
"FramesWithDeferredXmissions": 0,
"LateCollisions": 0,
"OctetsReceivedOK": 72571,
"MulticastFramesXmittedOK": 605,
"BroadcastFramesXmittedOK": 69,
"FramesWithExcessiveDeferral": 0,
"MulticastFramesReceivedOK": 336,
"BroadcastFramesReceivedOK": 46
},
"eth-ctrl": {},
"rmon": {
"etherStatsUndersizePkts": 0,
"etherStatsOversizePkts": 0,
"etherStatsFragments": 0,
"etherStatsJabbers": 0,
"rx-pktsNtoM": [
{
"low": 64,
"high": 64,
"val": 12
},
{
"low": 65,
"high": 127,
"val": 603
},
{
"low": 128,
"high": 255,
"val": 168
},
{
"low": 256,
"high": 511,
"val": 348
},
{
"low": 512,
"high": 1023,
"val": 0
},
{
"low": 1024,
"high": 65535,
"val": 0
}
]
}
}
]
@@ -1,61 +0,0 @@
[
{
"ifname": "e4",
"eth-phy": {},
"eth-mac": {
"FramesTransmittedOK": 713,
"SingleCollisionFrames": 0,
"MultipleCollisionFrames": 0,
"FramesReceivedOK": 418,
"FrameCheckSequenceErrors": 0,
"OctetsTransmittedOK": 129130,
"FramesWithDeferredXmissions": 0,
"LateCollisions": 0,
"OctetsReceivedOK": 72571,
"MulticastFramesXmittedOK": 605,
"BroadcastFramesXmittedOK": 69,
"FramesWithExcessiveDeferral": 0,
"MulticastFramesReceivedOK": 336,
"BroadcastFramesReceivedOK": 46
},
"eth-ctrl": {},
"rmon": {
"etherStatsUndersizePkts": 0,
"etherStatsOversizePkts": 0,
"etherStatsFragments": 0,
"etherStatsJabbers": 0,
"rx-pktsNtoM": [
{
"low": 64,
"high": 64,
"val": 12
},
{
"low": 65,
"high": 127,
"val": 603
},
{
"low": 128,
"high": 255,
"val": 168
},
{
"low": 256,
"high": 511,
"val": 348
},
{
"low": 512,
"high": 1023,
"val": 0
},
{
"low": 1024,
"high": 65535,
"val": 0
}
]
}
}
]
@@ -1,17 +0,0 @@
Settings for br0:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Auto-negotiation: off
Port: Other
PHYAD: 0
Transceiver: internal
Link detected: yes
@@ -1,32 +0,0 @@
Settings for dsa0:
Supported ports: [ MII ]
Supported link modes: 10000baseT/Full
10000baseKX4/Full
10000baseKR/Full
10000baseCR/Full
10000baseSR/Full
10000baseLR/Full
10000baseLRM/Full
10000baseER/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10000baseT/Full
10000baseKX4/Full
10000baseKR/Full
10000baseCR/Full
10000baseSR/Full
10000baseLR/Full
10000baseLRM/Full
10000baseER/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: on
Port: MII
PHYAD: 0
Transceiver: internal
netlink error: Operation not permitted
Link detected: yes
@@ -1,39 +0,0 @@
Settings for e0:
Supported ports: [ ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 4
Transceiver: external
MDI-X: on (auto)
Supports Wake-on: g
Wake-on: d
Link detected: yes
@@ -1,39 +0,0 @@
Settings for e1:
Supported ports: [ ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 4
Transceiver: external
MDI-X: on (auto)
Supports Wake-on: g
Wake-on: d
Link detected: yes
@@ -1,39 +0,0 @@
Settings for e2:
Supported ports: [ ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 4
Transceiver: external
MDI-X: on (auto)
Supports Wake-on: g
Wake-on: d
Link detected: yes
@@ -1,39 +0,0 @@
Settings for e3:
Supported ports: [ ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 4
Transceiver: external
MDI-X: on (auto)
Supports Wake-on: g
Wake-on: d
Link detected: yes
@@ -1,39 +0,0 @@
Settings for e4:
Supported ports: [ ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 4
Transceiver: external
MDI-X: on (auto)
Supports Wake-on: g
Wake-on: d
Link detected: yes
@@ -1 +0,0 @@
BOOT_ORDER=net primary secondary
@@ -1,661 +0,0 @@
[
{
"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
}
}
},
{
"ifindex": 9,
"link_index": 8,
"ifname": "veth0j",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "b2:82:e3:ce:d5:9e",
"broadcast": "ff:ff:ff:ff:ff:ff",
"link_netnsid": 1,
"addr_info": [
{
"family": "inet",
"local": "192.168.1.1",
"prefixlen": 24,
"scope": "global",
"protocol": "static",
"label": "veth0j",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
}
]
@@ -1,10 +0,0 @@
[
{
"name": "57ff63cb",
"id": 0
},
{
"name": "db5ad90e",
"id": 1
}
]
@@ -1,678 +0,0 @@
[
{
"ifindex": 2,
"ifname": "dsa0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1504,
"qdisc": "mq",
"operstate": "UP",
"linkmode": "DEFAULT",
"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,
"inet6_addr_gen_mode": "eui64",
"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",
"stats64": {
"rx": {
"bytes": 1751876,
"packets": 6757,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 1843945,
"packets": 7136,
"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": 27.38,
"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",
"linkmode": "DEFAULT",
"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": 53.73,
"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": 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": "e1000",
"parentdev": "e1000-foobar",
"stats64": {
"rx": {
"bytes": 6537,
"packets": 59,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 20891,
"packets": 106,
"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": "e1000",
"parentdev": "e1000-foobar",
"stats64": {
"rx": {
"bytes": 1397,
"packets": 11,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 24849,
"packets": 130,
"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",
"linkmode": "DEFAULT",
"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
}
},
"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": "virtio4",
"stats64": {
"rx": {
"bytes": 0,
"packets": 0,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 19114,
"packets": 81,
"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": 15057,
"packets": 72,
"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": 19022,
"packets": 95,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 9,
"link_index": 8,
"ifname": "veth0j",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "b2:82:e3:ce:d5:9e",
"broadcast": "ff:ff:ff:ff:ff:ff",
"link_netnsid": 1,
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_kind": "veth"
},
"inet6_addr_gen_mode": "none",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 524280,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"gso_ipv4_max_size": 65536,
"gro_ipv4_max_size": 65536,
"stats64": {
"rx": {
"bytes": 1006,
"packets": 13,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 18668,
"packets": 50,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
}
]
@@ -1,119 +0,0 @@
[
{
"ifindex": 1,
"ifname": "lo",
"flags": [
"LOOPBACK",
"UP",
"LOWER_UP"
],
"mtu": 65536,
"qdisc": "noqueue",
"operstate": "UNKNOWN",
"group": "default",
"txqlen": 1000,
"link_type": "loopback",
"address": "00:00:00:00:00:00",
"broadcast": "00:00:00:00:00:00",
"addr_info": [
{
"family": "inet",
"local": "127.0.0.1",
"prefixlen": 8,
"scope": "host",
"label": "lo",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},
{
"family": "inet6",
"local": "::1",
"prefixlen": 128,
"scope": "host",
"protocol": "kernel_lo",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
},
{
"ifindex": 3,
"ifname": "eth0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "pfifo_fast",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "02:00:00:00:00:02",
"broadcast": "ff:ff:ff:ff:ff:ff",
"addr_info": [
{
"family": "inet",
"local": "172.0.0.1",
"prefixlen": 24,
"broadcast": "172.0.0.255",
"scope": "global",
"label": "eth0",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},
{
"family": "inet6",
"local": "fe80::ff:fe00:2",
"prefixlen": 64,
"scope": "link",
"protocol": "kernel_ll",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
},
{
"ifindex": 6,
"link_index": 7,
"ifname": "eth1",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "62:64:85:4c:7c:87",
"broadcast": "ff:ff:ff:ff:ff:ff",
"link_netnsid": 0,
"addr_info": [
{
"family": "inet",
"local": "192.168.0.2",
"prefixlen": 24,
"broadcast": "192.168.0.255",
"scope": "global",
"label": "eth1",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},
{
"family": "inet6",
"local": "fe80::6064:85ff:fe4c:7c87",
"prefixlen": 64,
"scope": "link",
"protocol": "kernel_ll",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
}
]
@@ -1,163 +0,0 @@
[
{
"ifindex": 1,
"ifname": "lo",
"flags": [
"LOOPBACK",
"UP",
"LOWER_UP"
],
"mtu": 65536,
"qdisc": "noqueue",
"operstate": "UNKNOWN",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "loopback",
"address": "00:00:00:00:00:00",
"broadcast": "00:00:00:00:00:00",
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 0,
"max_mtu": 0,
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 524280,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"gso_ipv4_max_size": 65536,
"gro_ipv4_max_size": 65536,
"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": 3,
"ifname": "eth0",
"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:02",
"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,
"gso_ipv4_max_size": 65536,
"gro_ipv4_max_size": 65536,
"parentbus": "virtio",
"parentdev": "virtio3",
"ifalias": "e2",
"stats64": {
"rx": {
"bytes": 0,
"packets": 0,
"errors": 0,
"dropped": 0,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 1006,
"packets": 13,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
},
{
"ifindex": 6,
"link_index": 7,
"ifname": "eth1",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "62:64:85:4c:7c:87",
"broadcast": "ff:ff:ff:ff:ff:ff",
"link_netnsid": 0,
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_kind": "veth"
},
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 524280,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"gso_ipv4_max_size": 65536,
"gro_ipv4_max_size": 65536,
"ifalias": "veth0b",
"stats64": {
"rx": {
"bytes": 17643,
"packets": 44,
"errors": 0,
"dropped": 24,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 1006,
"packets": 13,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
}
]
@@ -1,80 +0,0 @@
[
{
"ifindex": 1,
"ifname": "lo",
"flags": [
"LOOPBACK",
"UP",
"LOWER_UP"
],
"mtu": 65536,
"qdisc": "noqueue",
"operstate": "UNKNOWN",
"group": "default",
"txqlen": 1000,
"link_type": "loopback",
"address": "00:00:00:00:00:00",
"broadcast": "00:00:00:00:00:00",
"addr_info": [
{
"family": "inet",
"local": "127.0.0.1",
"prefixlen": 8,
"scope": "host",
"label": "lo",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},
{
"family": "inet6",
"local": "::1",
"prefixlen": 128,
"scope": "host",
"protocol": "kernel_lo",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
},
{
"ifindex": 8,
"link_index": 9,
"ifname": "eth0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "c2:1b:78:88:e2:b8",
"broadcast": "ff:ff:ff:ff:ff:ff",
"link_netnsid": 0,
"addr_info": [
{
"family": "inet",
"local": "192.168.1.2",
"prefixlen": 24,
"broadcast": "192.168.1.255",
"scope": "global",
"label": "eth0",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},
{
"family": "inet6",
"local": "fe80::c01b:78ff:fe88:e2b8",
"prefixlen": 64,
"scope": "link",
"protocol": "kernel_ll",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
}
]
@@ -1,109 +0,0 @@
[
{
"ifindex": 1,
"ifname": "lo",
"flags": [
"LOOPBACK",
"UP",
"LOWER_UP"
],
"mtu": 65536,
"qdisc": "noqueue",
"operstate": "UNKNOWN",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "loopback",
"address": "00:00:00:00:00:00",
"broadcast": "00:00:00:00:00:00",
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 0,
"max_mtu": 0,
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 524280,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"gso_ipv4_max_size": 65536,
"gro_ipv4_max_size": 65536,
"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": 8,
"link_index": 9,
"ifname": "eth0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"linkmode": "DEFAULT",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "c2:1b:78:88:e2:b8",
"broadcast": "ff:ff:ff:ff:ff:ff",
"link_netnsid": 0,
"promiscuity": 0,
"allmulti": 0,
"min_mtu": 68,
"max_mtu": 65535,
"linkinfo": {
"info_kind": "veth"
},
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535,
"tso_max_size": 524280,
"tso_max_segs": 65535,
"gro_max_size": 65536,
"gso_ipv4_max_size": 65536,
"gro_ipv4_max_size": 65536,
"ifalias": "veth0k",
"stats64": {
"rx": {
"bytes": 15197,
"packets": 37,
"errors": 0,
"dropped": 22,
"over_errors": 0,
"multicast": 0
},
"tx": {
"bytes": 1006,
"packets": 13,
"errors": 0,
"dropped": 0,
"carrier_errors": 0,
"collisions": 0
}
}
}
]
@@ -1,61 +0,0 @@
{
"pid": 6510,
"query-interval": 125,
"query-response-interval": 10,
"query-last-member-interval": 1,
"robustness": 2,
"router-timeout": 255,
"router-alert": true,
"fast-leave-ports": [ ],
"multicast-router-ports": [ ],
"multicast-flood-ports": [ "e0", "e1", "e2" ],
"multicast-queriers": [
{
"interface": "br0",
"state": "up",
"querier": "0.0.0.0",
"interval": 125,
"version": 3
}
],
"multicast-groups": [
{
"bridge": "br0",
"group": "230.1.32.100",
"mac": "01:00:5e:01:20:64",
"ports": [ "e0" ]
},
{
"bridge": "br0",
"group": "230.1.2.100",
"mac": "01:00:5e:01:02:64",
"ports": [ "e1" ]
},
{
"bridge": "br0",
"group": "01:01:01:01:01:01",
"mac": "01:01:01:01:01:01",
"ports": [ "e1" ]
},
{
"bridge": "br0",
"group": "230.1.2.2",
"mac": "01:00:5e:01:02:02",
"ports": [ "e0" ]
},
{
"bridge": "br1",
"vid": 30,
"group": "ff02::6a",
"mac": "33:33:00:00:00:6a",
"ports": [ "e2" ]
},
{
"bridge": "br1",
"vid": 30,
"group": "224.2.2.2",
"mac": "33:33:00:00:00:6a",
"ports": [ "e2" ]
}
]
}
@@ -1,73 +0,0 @@
[
{
"AutoRemove": false,
"Command": null,
"CreatedAt": "25 minutes ago",
"Exited": false,
"ExitedAt": 1730216567,
"ExitCode": 0,
"Id": "cf054e1bc3ff7d7d6fec0cc9a0435f0c96f166e54bc9e9d92149ab53ffa60321",
"Image": "ghcr.io/kernelkit/curios:edge",
"ImageID": "cee712df3c4ea28bd3f03ca50d46e53788b1526812f4dac8d9133870eb5c49c0",
"IsInfra": false,
"Labels": {
"org.opencontainers.image.title": "curiOS",
"org.opencontainers.image.url": "https://github.com/kernelkit/curiOS"
},
"Mounts": [],
"Names": [
"system2"
],
"Namespaces": {
},
"Networks": [
"veth0k"
],
"Pid": 3934,
"Pod": "",
"PodName": "",
"Ports": null,
"Size": null,
"StartedAt": 1730216629,
"State": "running",
"Status": "Up 3 minutes",
"Created": 1730215318
},
{
"AutoRemove": false,
"Command": null,
"CreatedAt": "22 minutes ago",
"Exited": false,
"ExitedAt": 1730216567,
"ExitCode": 0,
"Id": "400172de2290a387bd10de7c2995a0876169a4b69679b862b474c645308dcea1",
"Image": "ghcr.io/kernelkit/curios:edge",
"ImageID": "cee712df3c4ea28bd3f03ca50d46e53788b1526812f4dac8d9133870eb5c49c0",
"IsInfra": false,
"Labels": {
"org.opencontainers.image.title": "curiOS",
"org.opencontainers.image.url": "https://github.com/kernelkit/curiOS"
},
"Mounts": [],
"Names": [
"system"
],
"Namespaces": {
},
"Networks": [
"e2",
"veth0b"
],
"Pid": 3933,
"Pod": "",
"PodName": "",
"Ports": null,
"Size": null,
"StartedAt": 1730216629,
"State": "running",
"Status": "Up 3 minutes",
"Created": 1730215507
}
]
@@ -1 +0,0 @@
{"operation": "idle", "progress": {"percentage": "100", "message": "Installing failed."}}
@@ -1 +0,0 @@
{"compatible":"infix-aarch64","variant":"","booted":"net","boot_primary":"net.0","slots":[{"rootfs.1":{"class":"rootfs","device":"/dev/disk/by-partlabel/secondary","type":"raw","bootname":"secondary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"bad","slot_status":{"bundle":{"compatible":"infix-aarch64","version":"pr873.2a39a38","hash":"99a9543fe85a2b32a4a28409f7103099fd8cfce3f3bbccb5175ace74e7bf9ea6"},"checksum":{"sha256":"d2595e8af8468c19a5da6c3fffbf27ff8e00d7ac2559a87f60591829151fd7e3","size":59707392},"installed":{"timestamp":"2024-12-16T14:40:54Z","count":12},"activated":{"timestamp":"2024-12-16T14:40:54Z","count":12},"status":"ok"}}},{"rootfs.0":{"class":"rootfs","device":"/dev/disk/by-partlabel/primary","type":"raw","bootname":"primary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"bad","slot_status":{"bundle":{"compatible":"infix-aarch64","version":"pr871.a4ef38f","hash":"d36189afff31ac1193ee7eda161f7e9b2007df08ccdc0014cfa231f9a836780a"},"checksum":{"sha256":"d78a9ef52f08238972b6b9151c381327dd0c40e410f9ed4634e379056f9bacd8","size":59699200},"installed":{"timestamp":"2024-12-13T20:00:42Z","count":3},"activated":{"timestamp":"2024-12-13T20:00:42Z","count":4},"status":"ok"}}},{"net.0":{"class":"net","device":"/dev/ram0","type":"raw","bootname":"net","state":"booted","parent":null,"mountpoint":null,"boot_status":"good","slot_status":{"bundle":{"compatible":null}}}}]}
@@ -1 +0,0 @@
{"10.0.0.1/32":{"routeType":"N","transit":false,"cost":0,"area":"0.0.0.1","nexthops":[{"ip":" ","directlyAttachedTo":"lo"}]},"10.0.0.2/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"10.0.0.3/32":{"routeType":"N","transit":false,"cost":2000,"area":"0.0.0.1","nexthops":[{"ip":"10.0.13.2","via":"e6","advertisedRouter":"10.0.0.3"}]},"10.0.0.4/32":{"routeType":"N IA","cost":2001,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"10.0.12.0/30":{"routeType":"N","transit":true,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":" ","directlyAttachedTo":"e5"}]},"10.0.13.0/30":{"routeType":"N","transit":true,"cost":2000,"area":"0.0.0.1","nexthops":[{"ip":" ","directlyAttachedTo":"e6"}]},"10.0.23.0/30":{"routeType":"N","transit":true,"cost":2001,"area":"0.0.0.1","nexthops":[{"ip":"10.0.13.2","via":"e6","advertisedRouter":"10.0.0.3"}]},"10.0.24.0/30":{"routeType":"N IA","cost":2001,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"10.0.41.0/30":{"routeType":"N IA","cost":2002,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.8.1/32":{"routeType":"N","transit":false,"cost":0,"area":"0.0.0.1","nexthops":[{"ip":" ","directlyAttachedTo":"lo"}]},"11.0.9.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.10.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.11.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.12.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.13.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.14.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.15.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"192.168.3.0/24":{"routeType":"N","transit":false,"cost":2001,"area":"0.0.0.1","nexthops":[{"ip":"10.0.13.2","via":"e6","advertisedRouter":"10.0.0.3"}]},"1.1.1.1":{"routeType":"R ","cost":1,"area":"0.0.0.0","routerType":"abr","nexthops":[{"ip":"10.0.12.2","via":"e5"}]},"10.0.0.4":{"routeType":"R ","cost":2001,"area":"0.0.0.0","IA":true,"ia":true,"routerType":"asbr","nexthops":[{"ip":"10.0.12.2","via":"e5"}]},"192.168.4.0/24":{"routeType":"N E2","cost":2001,"type2cost":20,"tag":0,"nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]}}
@@ -1,302 +0,0 @@
{
"0.0.0.0/0":[
{
"prefix":"0.0.0.0/0",
"prefixLen":0,
"protocol":"ospf",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":110,
"metric":2,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":42,
"installedNexthopGroupId":42,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"ip":"10.0.23.1",
"afi":"ipv4",
"interfaceIndex":7,
"interfaceName":"e6",
"active":true,
"weight":1
}
]
}
],
"10.0.0.1/32":[
{
"prefix":"10.0.0.1/32",
"prefixLen":32,
"protocol":"ospf",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":110,
"metric":4000,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":43,
"installedNexthopGroupId":43,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"ip":"10.0.13.1",
"afi":"ipv4",
"interfaceIndex":6,
"interfaceName":"e5",
"active":true,
"weight":1
}
]
}
],
"10.0.0.3/32":[
{
"prefix":"10.0.0.3/32",
"prefixLen":32,
"protocol":"ospf",
"vrfId":0,
"vrfName":"default",
"distance":110,
"metric":0,
"table":254,
"internalStatus":0,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":30,
"uptime":"00:00:00",
"nexthops":[
{
"flags":1,
"directlyConnected":true,
"interfaceIndex":1,
"interfaceName":"lo",
"active":true,
"weight":1
}
]
},
{
"prefix":"10.0.0.3/32",
"prefixLen":32,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":25,
"installedNexthopGroupId":25,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":1,
"interfaceName":"lo",
"active":true
}
]
}
],
"10.0.13.0/30":[
{
"prefix":"10.0.13.0/30",
"prefixLen":30,
"protocol":"ospf",
"vrfId":0,
"vrfName":"default",
"distance":110,
"metric":2000,
"table":254,
"internalStatus":0,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":31,
"uptime":"00:00:00",
"nexthops":[
{
"flags":1,
"directlyConnected":true,
"interfaceIndex":6,
"interfaceName":"e5",
"active":true,
"weight":1
}
]
},
{
"prefix":"10.0.13.0/30",
"prefixLen":30,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":20,
"installedNexthopGroupId":20,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":6,
"interfaceName":"e5",
"active":true
}
]
}
],
"10.0.23.0/30":[
{
"prefix":"10.0.23.0/30",
"prefixLen":30,
"protocol":"ospf",
"vrfId":0,
"vrfName":"default",
"distance":110,
"metric":1,
"table":254,
"internalStatus":0,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":32,
"uptime":"00:00:00",
"nexthops":[
{
"flags":1,
"directlyConnected":true,
"interfaceIndex":7,
"interfaceName":"e6",
"active":true,
"weight":1
}
]
},
{
"prefix":"10.0.23.0/30",
"prefixLen":30,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":23,
"installedNexthopGroupId":23,
"uptime":"20:10:05",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":7,
"interfaceName":"e6",
"active":true
}
]
}
],
"192.168.3.0/24":[
{
"prefix":"192.168.3.0/24",
"prefixLen":24,
"protocol":"ospf",
"vrfId":0,
"vrfName":"default",
"distance":110,
"metric":1,
"table":254,
"internalStatus":0,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":33,
"uptime":"5d13h05m",
"nexthops":[
{
"flags":1,
"directlyConnected":true,
"interfaceIndex":3,
"interfaceName":"e2",
"active":true,
"weight":1
}
]
},
{
"prefix":"192.168.3.0/24",
"prefixLen":24,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":17,
"installedNexthopGroupId":17,
"uptime":"01w1d13h",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":3,
"interfaceName":"e2",
"active":true
}
]
}
]
}
@@ -1,294 +0,0 @@
{
"::/0":[
{
"prefix":"::/0",
"prefixLen":0,
"protocol":"static",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":1,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":73,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":24,
"installedNexthopGroupId":24,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"ip":"2001:db8:3c4d:50::1",
"afi":"ipv6",
"interfaceIndex":7,
"interfaceName":"e6",
"active":true,
"weight":1
}
]
}
],
"2001:db8:3c4d:50::/64":[
{
"prefix":"2001:db8:3c4d:50::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":15,
"installedNexthopGroupId":15,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":7,
"interfaceName":"e6",
"active":true
}
]
}
],
"2001:db8:3c4d:200::1/128":[
{
"prefix":"2001:db8:3c4d:200::1/128",
"prefixLen":128,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":13,
"installedNexthopGroupId":13,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":1,
"interfaceName":"lo",
"active":true
}
]
}
],
"fe80::/64":[
{
"prefix":"fe80::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":14,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":8,
"interfaceName":"e7",
"active":true
}
]
},
{
"prefix":"fe80::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":15,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":7,
"interfaceName":"e6",
"active":true
}
]
},
{
"prefix":"fe80::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":16,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":6,
"interfaceName":"e5",
"active":true
}
]
},
{
"prefix":"fe80::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":17,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":5,
"interfaceName":"e4",
"active":true
}
]
},
{
"prefix":"fe80::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":18,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":4,
"interfaceName":"e3",
"active":true
}
]
},
{
"prefix":"fe80::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":0,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":19,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":3,
"interfaceName":"e2",
"active":true
}
]
},
{
"prefix":"fe80::/64",
"prefixLen":64,
"protocol":"connected",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
"distance":0,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":20,
"installedNexthopGroupId":20,
"uptime":"00:00:00",
"nexthops":[
{
"flags":3,
"fib":true,
"directlyConnected":true,
"interfaceIndex":2,
"interfaceName":"e1",
"active":true
}
]
}
]
}
@@ -127,6 +127,17 @@ with infamy.Test() as test:
"name": br_D,
"type": "infix-if-type:bridge",
"enabled": True,
"ietf-ip:ipv4": {
"address": [
{ "ip": "192.168.20.1", "prefix-length": 24 },
{ "ip": "10.0.0.1", "prefix-length": 8 },
],
},
"ietf-ip:ipv6": {
"address": [
{ "ip": "2001:db8::1", "prefix-length": 64 },
],
},
},
{
"name": veth_a_20,
@@ -152,6 +163,18 @@ with infamy.Test() as test:
"name": br_Q,
"type": "infix-if-type:bridge",
"enabled": True,
"infix-interfaces:bridge": {
"vlans": {
"vlan": [
{ "vid": 20, "untagged": [br_Q], "tagged": [eth_Q, veth_b] },
{ "vid": 30, "untagged": [br_Q], "tagged": [eth_Q, veth_b] },
{ "vid": 40, "untagged": [], "tagged": [br_Q, eth_Q, veth_b] },
],
}
},
"infix-interfaces:bridge-port": {
"pvid": 10,
}
},
{
"name": eth_Q,
@@ -190,6 +213,46 @@ with infamy.Test() as test:
}
})
with test.step("Configure GRE Tunnels"):
target.put_config_dict("ietf-interfaces", {
"interfaces": {
"interface": [
{
"name": "gre-v4",
"type": "infix-if-type:gre",
"infix-interfaces:gre": {
"local": "192.168.20.1",
"remote": "192.168.20.2",
}
},
{
"name": "gre-v6",
"type": "infix-if-type:gre",
"infix-interfaces:gre": {
"local": "2001:db8::1",
"remote": "2001:db8::2",
}
},
{
"name": "gretap-v4",
"type": "infix-if-type:gretap",
"infix-interfaces:gre": {
"local": "192.168.20.1",
"remote": "192.168.20.2",
}
},
{
"name": "gretap-v6",
"type": "infix-if-type:gretap",
"infix-interfaces:gre": {
"local": "2001:db8::1",
"remote": "2001:db8::2",
}
},
]
}
})
with test.step("Verify interface 'lo' is of type loopback"):
verify_interface(target, "lo", "loopback")
@@ -213,4 +276,10 @@ with infamy.Test() as test:
verify_interface(target, f"{eth_Q}.10", "vlan")
verify_interface(target, "br-Q.40", "vlan")
with test.step("Verify GRE interfaces 'gre-v4', 'gre-v6', 'gretap-v4' and 'gretap-v6'"):
verify_interface(target, "gre-v4", "gre")
verify_interface(target, "gre-v6", "gre")
verify_interface(target, "gretap-v4", "gretap")
verify_interface(target, "gretap-v6", "gretap")
test.succeed()
+9
View File
@@ -0,0 +1,9 @@
---
- case: bridge-mdb/test
name: "bridge-mdb"
- case: containers/test
name: "containers"
- case: interfaces-all/test
name: "interfaces-all"
- case: system/test
name: "system"
@@ -0,0 +1,4 @@
BRIDGE VID GROUP PORTS 
br0 01:00:00:01:02:03 e3
br0 224.1.1.1 e3
br0 ff02::6a br0
@@ -0,0 +1,293 @@
{
"ietf-interfaces:interfaces": {
"interface": [
{
"type": "infix-if-type:loopback",
"name": "lo",
"if-index": 1,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:00:00:00:00:00",
"statistics": {
"in-octets": "568136",
"out-octets": "568136"
},
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8,
"origin": "static"
}
]
},
"ietf-ip:ipv6": {
"mtu": 65536,
"address": [
{
"ip": "::1",
"prefix-length": 128,
"origin": "static"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e1",
"if-index": 2,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:01",
"statistics": {
"in-octets": "6056801",
"out-octets": "8943399"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:301",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e2",
"if-index": 3,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:02",
"statistics": {
"in-octets": "4388",
"out-octets": "223073"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"bridge": "br0",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:etherlike",
"name": "e3",
"if-index": 4,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:03",
"statistics": {
"in-octets": "25889",
"out-octets": "375562"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"bridge": "br0",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:etherlike",
"name": "e4",
"if-index": 5,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:04",
"statistics": {
"in-octets": "32799",
"out-octets": "354844"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"bridge": "br0",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:etherlike",
"name": "e5",
"if-index": 6,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:05",
"statistics": {
"in-octets": "68102",
"out-octets": "151156"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:305",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e6",
"if-index": 7,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:06",
"statistics": {
"in-octets": "137033",
"out-octets": "255084"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:306",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e7",
"if-index": 8,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:07",
"statistics": {
"in-octets": "71136",
"out-octets": "153864"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:307",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:bridge",
"name": "br0",
"if-index": 62,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:00",
"statistics": {
"in-octets": "2200",
"out-octets": "27797"
},
"ietf-ip:ipv4": {
"mtu": 1500,
"address": [
{
"ip": "10.0.0.1",
"prefix-length": 24,
"origin": "static"
}
]
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge": {
"multicast": {
"snooping": true,
"querier": "auto",
"query-interval": 125
},
"multicast-filters": {
"multicast-filter": [
{
"group": "01:00:00:01:02:03",
"ports": [
{
"port": "e3",
"state": "permanent"
}
]
},
{
"group": "224.1.1.1",
"ports": [
{
"port": "e3",
"state": "permanent"
}
]
},
{
"group": "ff02::6a",
"ports": [
{
"port": "br0",
"state": "temporary"
}
]
}
]
}
}
}
]
}
}
+293
View File
@@ -0,0 +1,293 @@
{
"ietf-interfaces:interfaces": {
"interface": [
{
"admin-status": "up",
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"origin": "static",
"prefix-length": 8
}
]
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "::1",
"origin": "static",
"prefix-length": 128
}
],
"mtu": 65536
},
"if-index": 1,
"name": "lo",
"oper-status": "up",
"phys-address": "00:00:00:00:00:00",
"statistics": {
"in-octets": "568136",
"out-octets": "568136"
},
"type": "infix-if-type:loopback"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "fe80::2a0:85ff:fe00:301",
"origin": "link-layer",
"prefix-length": 64
}
],
"mtu": 1500
},
"if-index": 2,
"name": "e1",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:01",
"statistics": {
"in-octets": "6056801",
"out-octets": "8943399"
},
"type": "infix-if-type:etherlike"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"if-index": 3,
"infix-interfaces:bridge-port": {
"bridge": "br0",
"flood": {
"broadcast": true,
"multicast": true,
"unicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
},
"name": "e2",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:02",
"statistics": {
"in-octets": "4388",
"out-octets": "223073"
},
"type": "infix-if-type:etherlike"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"if-index": 4,
"infix-interfaces:bridge-port": {
"bridge": "br0",
"flood": {
"broadcast": true,
"multicast": true,
"unicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
},
"name": "e3",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:03",
"statistics": {
"in-octets": "25889",
"out-octets": "375562"
},
"type": "infix-if-type:etherlike"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"if-index": 5,
"infix-interfaces:bridge-port": {
"bridge": "br0",
"flood": {
"broadcast": true,
"multicast": true,
"unicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
},
"name": "e4",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:04",
"statistics": {
"in-octets": "32799",
"out-octets": "354844"
},
"type": "infix-if-type:etherlike"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "fe80::2a0:85ff:fe00:305",
"origin": "link-layer",
"prefix-length": 64
}
],
"mtu": 1500
},
"if-index": 6,
"name": "e5",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:05",
"statistics": {
"in-octets": "68102",
"out-octets": "151156"
},
"type": "infix-if-type:etherlike"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "fe80::2a0:85ff:fe00:306",
"origin": "link-layer",
"prefix-length": 64
}
],
"mtu": 1500
},
"if-index": 7,
"name": "e6",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:06",
"statistics": {
"in-octets": "137033",
"out-octets": "255084"
},
"type": "infix-if-type:etherlike"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "fe80::2a0:85ff:fe00:307",
"origin": "link-layer",
"prefix-length": 64
}
],
"mtu": 1500
},
"if-index": 8,
"name": "e7",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:07",
"statistics": {
"in-octets": "71136",
"out-octets": "153864"
},
"type": "infix-if-type:etherlike"
},
{
"admin-status": "up",
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.0.0.1",
"origin": "static",
"prefix-length": 24
}
],
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"if-index": 62,
"infix-interfaces:bridge": {
"multicast": {
"querier": "auto",
"query-interval": 125,
"snooping": true
},
"multicast-filters": {
"multicast-filter": [
{
"group": "01:00:00:01:02:03",
"ports": [
{
"port": "e3",
"state": "permanent"
}
]
},
{
"group": "224.1.1.1",
"ports": [
{
"port": "e3",
"state": "permanent"
}
]
},
{
"group": "ff02::6a",
"ports": [
{
"port": "br0",
"state": "temporary"
}
]
}
]
}
},
"name": "br0",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:00",
"statistics": {
"in-octets": "2200",
"out-octets": "27797"
},
"type": "infix-if-type:bridge"
}
]
}
}
@@ -0,0 +1 @@
65536
@@ -0,0 +1 @@
[{"mdb":[{"index":62,"dev":"br0","port":"e3","grp":"01:00:00:01:02:03","state":"permanent","flags":[]},{"index":62,"dev":"br0","port":"e3","grp":"224.1.1.1","state":"permanent","flags":[]},{"index":62,"dev":"br0","port":"br0","grp":"ff02::6a","state":"temp","flags":[]}],"router":{}}]
@@ -0,0 +1 @@
[]
@@ -0,0 +1 @@
[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UP","group":"iface","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","addr_info":[{"family":"inet","local":"127.0.0.1","prefixlen":8,"scope":"host","protocol":"static","label":"lo","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"::1","prefixlen":128,"scope":"host","protocol":"static","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":2,"ifname":"e1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:01","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:301","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":3,"ifname":"e2","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":4,"ifname":"e3","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":5,"ifname":"e4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":6,"ifname":"e5","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:05","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:305","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":7,"ifname":"e6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:06","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:306","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":8,"ifname":"e7","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:07","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:307","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":62,"ifname":"br0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet","local":"10.0.0.1","prefixlen":24,"scope":"global","protocol":"static","label":"br0","valid_life_time":4294967295,"preferred_life_time":4294967295}]}]
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
{
"pid": 4570,
"query-interval": 125,
"query-response-interval": 10,
"query-last-member-interval": 1,
"robustness": 2,
"router-timeout": 255,
"router-alert": true,
"fast-leave-ports": [ ],
"multicast-router-ports": [ ],
"multicast-flood-ports": [ "e2", "e3", "e4" ],
"multicast-queriers": [
{
"interface": "br0",
"state": "up",
"querier": "10.0.0.1",
"interval": 125,
"version": 3
}
],
"multicast-groups": [
{
"bridge": "br0",
"group": "01:00:00:01:02:03",
"mac": "01:00:00:01:02:03",
"ports": [ "e3" ]
},
{
"bridge": "br0",
"group": "224.1.1.1",
"mac": "01:00:5e:01:01:01",
"ports": [ "e3" ]
},
{
"bridge": "br0",
"group": "ff02::6a",
"mac": "33:33:00:00:00:6a",
"ports": [ "br0" ]
}
]
}
@@ -0,0 +1 @@
[]
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
yang_models="ietf-interfaces"
gen_test=ietf_interfaces/static_multicast_filters/test.py
gen_iface=d3a
cli_commands="show-bridge-mdb"
. $(readlink -f $(dirname $0)/../test.sh)
main "$@"
@@ -0,0 +1,41 @@
INTERFACE PROTOCOL STATE DATA 
lo ethernet UP 00:00:00:00:00:00
ipv4 127.0.0.1/8 (static)
ipv6 ::1/128 (static)
br0 bridge  vlan:1u pvid:1
│ ethernet UP 00:a0:85:00:03:00
│ ipv4 169.254.1.1/16 (random)
│ ipv6 fe80::2a0:85ff:fe00:300/64 (link-layer)
├ e3 bridge FORWARDING vlan:1u pvid:1
├ e4 bridge FORWARDING vlan:1u pvid:1
├ veth0b bridge FORWARDING vlan:1u pvid:1
└ veth2b bridge FORWARDING vlan:1u pvid:1
br1 bridge  
│ ethernet UP 00:a0:85:00:03:00
├ veth1b bridge FORWARDING vlan:6u pvid:6
└ veth3b bridge FORWARDING 
e1 ethernet UP 00:a0:85:00:03:01
ipv6 fe80::2a0:85ff:fe00:301/64 (link-layer)
e2 ethernet UP 00:a0:85:00:03:02
ipv6 fe80::2a0:85ff:fe00:302/64 (link-layer)
e3.8 ethernet UP 00:a0:85:00:03:03
│ ipv4 10.1.1.1/32 (static)
└ e3 ethernet UP 00:a0:85:00:03:03
e4.8 ethernet UP 00:a0:85:00:03:04
│ ipv4 10.1.1.1/32 (static)
└ e4 ethernet UP 00:a0:85:00:03:04
e5 ethernet UP 00:a0:85:00:03:05
ipv6 fe80::2a0:85ff:fe00:305/64 (link-layer)
e6 ethernet UP 00:a0:85:00:03:06
ipv4 10.1.1.101/24 (static)
ipv6 fe80::2a0:85ff:fe00:306/64 (link-layer)
e7 ethernet UP 00:a0:85:00:03:07
ipv6 fe80::2a0:85ff:fe00:307/64 (link-layer)
veth0a container container-A 
veth0b ethernet UP c2:61:ae:82:0a:c1
veth1a container container-A 
veth1b ethernet UP e6:c6:34:dc:b9:f4
veth2a container container-B 
veth2b ethernet UP 96:8b:c6:17:74:d3
veth3a container container-B 
veth3b ethernet UP 0e:c3:01:d6:e6:ea
@@ -0,0 +1,12 @@
 DESTINATION PREF NEXT-HOP PROTO UPTIME
>* 0.0.0.0/0 110/2 10.1.1.100 ospfv2 01:59:57
0.0.0.0/0 254/0 br0 static 02:00:37
10.1.1.0/24 110/1 e6 ospfv2 02:00:07
>* 10.1.1.0/24 0/0 e6 direct 02:00:51
* 10.1.1.1/32 0/0 e4.8 direct 02:00:52
>* 10.1.1.1/32 0/0 e3.8 direct 02:00:52
>* 10.1.2.0/24 110/2 10.1.1.100 ospfv2 01:59:57
* 10.1.2.1
>* 10.1.3.0/24 110/2 10.1.1.100 ospfv2 01:59:57
* 10.1.3.1
>* 169.254.0.0/16 0/0 br0 direct 02:00:46
@@ -0,0 +1,7 @@
 DESTINATION PREF NEXT-HOP PROTO UPTIME
* fe80::/64 0/0 e6 direct 02:00:50
* fe80::/64 0/0 br0 direct 02:00:50
* fe80::/64 0/0 e5 direct 03:54:57
* fe80::/64 0/0 e7 direct 03:54:57
* fe80::/64 0/0 e2 direct 03:54:57
>* fe80::/64 0/0 e1 direct 03:54:57
@@ -0,0 +1,642 @@
{
"ietf-interfaces:interfaces": {
"interface": [
{
"type": "infix-if-type:loopback",
"name": "lo",
"if-index": 1,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:00:00:00:00:00",
"statistics": {
"in-octets": "72275",
"out-octets": "72275"
},
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8,
"origin": "static"
}
]
},
"ietf-ip:ipv6": {
"mtu": 65536,
"address": [
{
"ip": "::1",
"prefix-length": 128,
"origin": "static"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e1",
"if-index": 2,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:01",
"statistics": {
"in-octets": "5166282",
"out-octets": "7407399"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:301",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e2",
"if-index": 3,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:02",
"statistics": {
"out-octets": "79382"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:302",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e3",
"if-index": 4,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:03",
"statistics": {
"in-octets": "23589",
"out-octets": "208789"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"pvid": 1,
"bridge": "br0",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:etherlike",
"name": "e4",
"if-index": 5,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:04",
"statistics": {
"in-octets": "30583",
"out-octets": "206341"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"pvid": 1,
"bridge": "br0",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:etherlike",
"name": "e5",
"if-index": 6,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:05",
"statistics": {
"in-octets": "66626",
"out-octets": "83465"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:305",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e6",
"if-index": 7,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:06",
"statistics": {
"in-octets": "134367",
"out-octets": "184122"
},
"ietf-ip:ipv4": {
"mtu": 1500,
"address": [
{
"ip": "10.1.1.101",
"prefix-length": 24,
"origin": "static"
}
]
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:306",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:etherlike",
"name": "e7",
"if-index": 8,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:07",
"statistics": {
"in-octets": "70368",
"out-octets": "86243"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:307",
"prefix-length": 64,
"origin": "link-layer"
}
]
}
},
{
"type": "infix-if-type:veth",
"name": "veth0b",
"if-index": 22,
"admin-status": "up",
"oper-status": "up",
"phys-address": "c2:61:ae:82:0a:c1",
"statistics": {
"in-octets": "1583",
"out-octets": "28383"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"pvid": 1,
"bridge": "br0",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:veth",
"name": "veth2b",
"if-index": 24,
"admin-status": "up",
"oper-status": "up",
"phys-address": "96:8b:c6:17:74:d3",
"statistics": {
"in-octets": "796",
"out-octets": "28028"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"pvid": 1,
"bridge": "br0",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:bridge",
"name": "br0",
"if-index": 25,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:00",
"statistics": {
"in-octets": "3285",
"out-octets": "28281"
},
"ietf-ip:ipv4": {
"mtu": 1500,
"address": [
{
"ip": "169.254.1.1",
"prefix-length": 16,
"origin": "random"
}
]
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::2a0:85ff:fe00:300",
"prefix-length": 64,
"origin": "link-layer"
}
]
},
"infix-interfaces:bridge": {
"vlans": {
"proto": "ieee802-dot1q-types:c-vlan",
"vlan": [
{
"vid": 1,
"untagged": [
"br0",
"e3",
"e4",
"veth0b",
"veth2b"
],
"tagged": [],
"multicast": {
"snooping": true,
"querier": "off"
},
"multicast-filters": {
"multicast-filter": []
}
}
]
}
},
"infix-interfaces:bridge-port": {
"pvid": 1
}
},
{
"type": "infix-if-type:veth",
"name": "veth1b",
"if-index": 27,
"admin-status": "up",
"oper-status": "up",
"phys-address": "e6:c6:34:dc:b9:f4",
"statistics": {
"in-octets": "796"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"pvid": 6,
"bridge": "br1",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:veth",
"name": "veth3b",
"if-index": 29,
"admin-status": "up",
"oper-status": "up",
"phys-address": "0e:c3:01:d6:e6:ea",
"statistics": {
"in-octets": "796"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge-port": {
"bridge": "br1",
"flood": {
"broadcast": true,
"unicast": true,
"multicast": true
},
"multicast": {
"fast-leave": false,
"router": "auto"
},
"stp-state": "forwarding"
}
},
{
"type": "infix-if-type:bridge",
"name": "br1",
"if-index": 30,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:00",
"statistics": {
"in-octets": "656"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:bridge": {
"vlans": {
"proto": "ieee802-dot1q-types:c-vlan",
"vlan": [
{
"vid": 6,
"untagged": [
"veth1b"
],
"tagged": [],
"multicast": {
"snooping": true,
"querier": "off"
},
"multicast-filters": {
"multicast-filter": []
}
}
]
}
}
},
{
"type": "infix-if-type:vlan",
"name": "e3.8",
"if-index": 31,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:03",
"statistics": {
"in-octets": "5005",
"out-octets": "16009"
},
"ietf-ip:ipv4": {
"mtu": 1500,
"address": [
{
"ip": "10.1.1.1",
"prefix-length": 32,
"origin": "static"
}
]
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:vlan": {
"tag-type": "ieee802-dot1q-types:c-vlan",
"id": 8,
"lower-layer-if": "e3"
}
},
{
"type": "infix-if-type:vlan",
"name": "e4.8",
"if-index": 32,
"admin-status": "up",
"oper-status": "up",
"phys-address": "00:a0:85:00:03:04",
"statistics": {
"in-octets": "15080",
"out-octets": "15546"
},
"ietf-ip:ipv4": {
"mtu": 1500,
"address": [
{
"ip": "10.1.1.1",
"prefix-length": 32,
"origin": "static"
}
]
},
"ietf-ip:ipv6": {
"mtu": 1500
},
"infix-interfaces:vlan": {
"tag-type": "ieee802-dot1q-types:c-vlan",
"id": 8,
"lower-layer-if": "e4"
}
},
{
"type": "infix-if-type:veth",
"name": "veth2a",
"if-index": 23,
"admin-status": "up",
"oper-status": "up",
"description": "eth0",
"phys-address": "06:a0:85:00:03:00",
"statistics": {
"in-octets": "28028",
"out-octets": "796"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "fe80::4a0:85ff:fe00:300",
"prefix-length": 64,
"origin": "link-layer"
}
]
},
"infix-interfaces:container-network": {
"containers": [
"container-B"
]
}
},
{
"type": "infix-if-type:veth",
"name": "veth3a",
"if-index": 28,
"admin-status": "up",
"oper-status": "up",
"description": "eth1",
"phys-address": "06:a0:85:00:03:00",
"statistics": {
"out-octets": "796"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "fe80::4a0:85ff:fe00:300",
"prefix-length": 64,
"origin": "link-layer"
}
]
},
"infix-interfaces:container-network": {
"containers": [
"container-B"
]
}
},
{
"type": "infix-if-type:veth",
"name": "veth0a",
"if-index": 21,
"admin-status": "up",
"oper-status": "up",
"description": "br0",
"phys-address": "06:a0:85:00:03:00",
"statistics": {
"in-octets": "28425",
"out-octets": "1625"
},
"ietf-ip:ipv4": {
"mtu": 1500,
"address": [
{
"ip": "169.254.1.2",
"prefix-length": 16,
"origin": "other"
}
]
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::4a0:85ff:fe00:300",
"prefix-length": 64,
"origin": "link-layer"
}
]
},
"infix-interfaces:container-network": {
"containers": [
"container-A"
]
}
},
{
"type": "infix-if-type:veth",
"name": "veth1a",
"if-index": 26,
"admin-status": "up",
"oper-status": "up",
"description": "br1",
"phys-address": "06:a0:85:00:03:00",
"statistics": {
"out-octets": "796"
},
"ietf-ip:ipv4": {
"mtu": 1500
},
"ietf-ip:ipv6": {
"mtu": 1500,
"address": [
{
"ip": "fe80::4a0:85ff:fe00:300",
"prefix-length": 64,
"origin": "link-layer"
}
]
},
"infix-interfaces:container-network": {
"containers": [
"container-A"
]
}
}
]
}
}

Some files were not shown because too many files have changed in this diff Show More