Internet Connectivity Parameters

Overview

This document describes the parameters used to display Internet connectivity information for CPE devices. The connection type is determined by checking interface status, and uptime is the device uptime reported in Device.DeviceInfo.UpTime.

Connection Type Detection

Detection Rules

A connection type is active when both conditions are met:

%.Enable == True
%.Status == Up

Uptime:

Uptime = Device.DeviceInfo.UpTime

The uptime is the device uptime, not the interface LastChange. It is the same for all connection types.

Where %.Status == Up for the relevant connection type object.

Connection Type Priority

Check interfaces in this order to determine primary WAN connection:

  1. Ethernet - Device.Ethernet.Interface.{i}.Upstream == True

  2. Fiber - Device.Optical.Interface.{i}

  3. xDSL - Device.DSL.Line.{i}

  4. Mobile - Device.Cellular.Interface.{i}

Ethernet Connection

Detection

Condition Parameter

Upstream Interface

Device.Ethernet.Interface.{i}.Upstream == True

Enabled

Device.Ethernet.Interface.{i}.Enable == True

Active

Device.Ethernet.Interface.{i}.Status == Up

Parameters

Name Value Format Object/Parameter

Connection type

"Ethernet"

Detection based on above conditions

Uptime

dd:h:m

Device.DeviceInfo.UpTime

IP Address

IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY

Device.IP.Interface.{j}.IPv4Address.{k}.IPAddress Device.IP.Interface.{j}.IPv4Address.{k}.SubnetMask Device.IP.Interface.{j}.IPv6Address.{k}.IPAddress Device.IP.Interface.{j}.IPv6Prefix.{k}.Prefix

Addressing type

String

Device.IP.Interface.{j}.IPv4Address.{k}.AddressingType Device.IP.Interface.{j}.IPv6Prefix.{k}.Origin

MAC address

X:X:X:X:X:X

Device.Ethernet.Interface.{i}.MACAddress

Link speed

XXX Mbps

Device.Ethernet.Interface.{i}.CurrentBitRate

Duplex mode

String

Device.Ethernet.Interface.{i}.CurrentDuplexMode

Bytes received

XXX Bytes

Device.Ethernet.Interface.{i}.Stats.BytesReceived

Bytes sent

XXX Bytes

Device.Ethernet.Interface.{i}.Stats.BytesSent

Packets received

XXX Packets

Device.Ethernet.Interface.{i}.Stats.PacketsReceived

Packets sent

XXX Packets

Device.Ethernet.Interface.{i}.Stats.PacketsSent

Errors received

XXX Errors

Device.Ethernet.Interface.{i}.Stats.ErrorsReceived

Errors sent

XXX Errors

Device.Ethernet.Interface.{i}.Stats.ErrorsSent

Fiber (Optical) Connection

Detection

Condition Parameter

Enabled

Device.Optical.Interface.{i}.Enable == True

Active

Device.Optical.Interface.{i}.Status == Up

Parameters

Name Value Format Object/Parameter

Connection type

"Fiber"

Detection based on above conditions

Uptime

dd:h:m

Device.DeviceInfo.UpTime

IP Address

IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY

Device.IP.Interface.{j}.IPv4Address.{k}.IPAddress Device.IP.Interface.{j}.IPv4Address.{k}.SubnetMask Device.IP.Interface.{j}.IPv6Address.{k}.IPAddress Device.IP.Interface.{j}.IPv6Prefix.{k}.Prefix

Addressing type

String

Device.IP.Interface.{j}.IPv4Address.{k}.AddressingType Device.IP.Interface.{j}.IPv6Prefix.{k}.Origin

Max Link speed

XXX Mbps

Device.Optical.Interface.{i}.MaxBitRate

Optical Signal level

XX dBm

Device.Optical.Interface.{i}.OpticalSignalLevel (Value in dBm/1000, e.g., 12345 → 12.345 dBm)

Transmit Optical level

XX dBm

Device.Optical.Interface.{i}.TransmitOpticalLevel (Value in dBm/1000, e.g., 12345 → 12.345 dBm)

Bytes received

XXX Bytes

Device.Optical.Interface.{i}.Stats.BytesReceived

Bytes sent

XXX Bytes

Device.Optical.Interface.{i}.Stats.BytesSent

Packets received

XXX Packets

Device.Optical.Interface.{i}.Stats.PacketsReceived

Packets sent

XXX Packets

Device.Optical.Interface.{i}.Stats.PacketsSent

Errors received

XXX Errors

Device.Optical.Interface.{i}.Stats.ErrorsReceived

Errors sent

XXX Errors

Device.Optical.Interface.{i}.Stats.ErrorsSent

Optical Signal Level Conversion

Optical signal levels are stored as integers representing dBm × 1000:

Display Value [dBm] = Parameter Value / 1000

Example: 12345 → 12.345 dBm
Example: -8500 → -8.5 dBm

Mobile (Cellular) Connection

Detection

Condition Parameter

Enabled

Device.Cellular.Interface.{i}.Enable == True

Active

Device.Cellular.Interface.{i}.Status == Up

Display Label

Display as: "Mobile (Technology)" where Technology is from CurrentAccessTechnology

Example: "Mobile (LTE)", "Mobile (5G NR)"

Note: If CurrentAccessTechnology is empty or parameter doesn’t exist, display only "Mobile" without technology in parentheses.

Parameters

Name Value Format Object/Parameter

Connection type

"Mobile" or "Mobile (Technology)"

Device.Cellular.Interface.{i}.Enable Device.Cellular.Interface.{i}.Status Device.Cellular.Interface.{i}.CurrentAccessTechnology

Uptime

dd:h:m

Device.DeviceInfo.UpTime

IP Address

IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY

Device.IP.Interface.{j}.IPv4Address.{k}.IPAddress Device.IP.Interface.{j}.IPv4Address.{k}.SubnetMask Device.IP.Interface.{j}.IPv6Address.{k}.IPAddress Device.IP.Interface.{j}.IPv6Prefix.{k}.Prefix

Addressing type

String

Device.IP.Interface.{j}.IPv4Address.{k}.AddressingType Device.IP.Interface.{j}.IPv6Prefix.{k}.Origin

IMEI

String

Device.Cellular.Interface.{i}.IMEI

IMSI

String

Device.Cellular.Interface.{i}.USIM.IMSI

ICCID

String

Device.Cellular.Interface.{i}.USIM.ICCID

MSISDN

String

Device.Cellular.Interface.{i}.USIM.MSISDN

RSSI

XXX dBm

Device.Cellular.Interface.{i}.RSSI

RSRP

XXX dBm

Device.Cellular.Interface.{i}.RSRP

RSRQ

XXX dB

Device.Cellular.Interface.{i}.RSRQ

Download max speed

XXX Mbps

Device.Cellular.Interface.{i}.DownstreamMaxBitRate

Upload max speed

XXX Mbps

Device.Cellular.Interface.{i}.UpstreamMaxBitRate

Bytes received

XXX Bytes

Device.Cellular.Interface.{i}.Stats.BytesReceived

Bytes sent

XXX Bytes

Device.Cellular.Interface.{i}.Stats.BytesSent

Packets received

XXX Packets

Device.Cellular.Interface.{i}.Stats.PacketsReceived

Packets sent

XXX Packets

Device.Cellular.Interface.{i}.Stats.PacketsSent

Errors received

XXX Errors

Device.Cellular.Interface.{i}.Stats.ErrorsReceived

Errors sent

XXX Errors

Device.Cellular.Interface.{i}.Stats.ErrorsSent

CurrentAccessTechnology Values

The value must be a member of Device.Cellular.Interface.{i}.SupportedAccessTechnologies.

Common values include: - GPRS, EDGE (2G) - UMTS, HSPA, HSPA+ (3G) - LTE, LTE-A (4G) - 5G NR (5G)

xDSL Connection

Detection

Condition Parameter

Enabled

Device.DSL.Line.{i}.Enable == True

Active

Device.DSL.Line.{i}.Status == Up

Display Label

Display as: "DSL (Profile)" for VDSL where Profile is from CurrentProfile

Example: "DSL (17a)", "DSL (35b)"

Note: If CurrentProfile is empty or parameter doesn’t exist, display only "DSL" without profile in parentheses.

Parameters

Name Value Format Object/Parameter

Connection type

"DSL" or "DSL (Profile)"

Device.DSL.Line.{i}.Enable Device.DSL.Line.{i}.Status Device.DSL.Line.{i}.CurrentProfile (for VDSL)

Uptime

dd:h:m

Device.DeviceInfo.UpTime

IP Address

IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY

Device.IP.Interface.{j}.IPv4Address.{k}.IPAddress Device.IP.Interface.{j}.IPv4Address.{k}.SubnetMask Device.IP.Interface.{j}.IPv6Address.{k}.IPAddress Device.IP.Interface.{j}.IPv6Prefix.{k}.Prefix

Addressing type

String

Device.IP.Interface.{j}.IPv4Address.{k}.AddressingType Device.IP.Interface.{j}.IPv6Prefix.{k}.Origin

DL SNR

XX dB

Device.DSL.Line.{i}.DownstreamNoiseMargin

UL SNR

XX dB

Device.DSL.Line.{i}.UpstreamNoiseMargin

DL Max speed

XXX Mbps

Device.DSL.Line.{i}.DownstreamMaxBitRate

UL Max speed

XXX Mbps

Device.DSL.Line.{i}.UpstreamMaxBitRate

DL Attenuation

XX dB

Device.DSL.Line.{i}.DownstreamAttenuation Device.DSL.Line.{i}.TestParams.SATNds (for VDSL)

UL Attenuation

XX dB

Device.DSL.Line.{i}.UpstreamAttenuation Device.DSL.Line.{i}.TestParams.SATNus (for VDSL)

Bytes received

XXX Bytes

Device.DSL.Line.{i}.Stats.BytesReceived

Bytes sent

XXX Bytes

Device.DSL.Line.{i}.Stats.BytesSent

Packets received

XXX Packets

Device.DSL.Line.{i}.Stats.PacketsReceived

Packets sent

XXX Packets

Device.DSL.Line.{i}.Stats.PacketsSent

Errors received

XXX Errors

Device.DSL.Line.{i}.Stats.ErrorsReceived

Errors sent

XXX Errors

Device.DSL.Line.{i}.Stats.ErrorsSent

CurrentProfile Values

The value must be a member of Device.DSL.Line.{i}.AllowedProfiles.

Common VDSL2 profile values: - 8a, 8b, 8c, 8d - 12a, 12b - 17a - 30a - 35b

Uptime Calculation

Source

Uptime = Device.DeviceInfo.UpTime (seconds)

The value is the latest stored Device.DeviceInfo.UpTime of the device, a snapshot taken when the device last reported it, not a live clock. InternetGatewayDevice.DeviceInfo.UpTime (TR-098) is not processed.

DeviceInfo.UpTime is accepted only as plain non-negative digits (up to 18). Missing, encrypted, invalid or negative values are treated as unknown.

Days Uptime

Days uptime = UpTime / 86400   (whole days, rounded down)

Days uptime is empty when the device uptime is unknown.

Display Format

Format uptime as dd:hh:mm:ss, the same format as the Uptime column of the device list:

def format_uptime(seconds):
    days = seconds // 86400
    hours = (seconds % 86400) // 3600
    minutes = (seconds % 3600) // 60
    secs = seconds % 60
    return f"{days:02d}:{hours:02d}:{minutes:02d}:{secs:02d}"

# Example: 90061 seconds → "01:01:01:01" (1 day, 1 hour, 1 minute, 1 second)
# Example: 9472457 seconds → "109:15:14:17"; 0 seconds → "00:00:00:00"

When the device uptime is unknown, Additional info shows N/A.

IP Address Display

IPv4 Format

Display with subnet mask in CIDR notation:

IP Address: 192.168.1.1/24

Where:
  IPAddress = 192.168.1.1
  SubnetMask = 255.255.255.0 → /24

IPv6 Format

Display with prefix:

IP Address: 2001:db8::1/64

Where:
  IPAddress = 2001:db8::1
  Prefix = 64

Subnet Mask to CIDR Conversion

def mask_to_cidr(subnet_mask):
    # Count bits in subnet mask
    octets = subnet_mask.split('.')
    binary = ''.join(format(int(octet), '08b') for octet in octets)
    return binary.count('1')

# Examples:
# 255.255.255.0   → /24
# 255.255.255.128 → /25
# 255.255.0.0     → /16

Implementation Example

class InternetConnectivity:
    def detect_connection_type(self):
        # Check Ethernet (upstream interface)
        for eth in self.get_ethernet_interfaces():
            if eth.upstream and eth.enable and eth.status == "Up":
                return self._build_ethernet_info(eth)

        # Check Fiber
        for optical in self.get_optical_interfaces():
            if optical.enable and optical.status == "Up":
                return self._build_fiber_info(optical)

        # Check DSL
        for dsl in self.get_dsl_lines():
            if dsl.enable and dsl.status == "Up":
                return self._build_dsl_info(dsl)

        # Check Cellular
        for cellular in self.get_cellular_interfaces():
            if cellular.enable and cellular.status == "Up":
                return self._build_mobile_info(cellular)

        return None

    def _build_mobile_info(self, cellular):
        conn_type = "Mobile"
        if cellular.current_access_technology:
            conn_type = f"Mobile ({cellular.current_access_technology})"

        return {
            "connectionType": conn_type,
            "uptime": self._format_uptime(self.device_uptime_seconds),
            "ipAddress": self._get_ip_address(cellular),
            "imei": cellular.imei,
            "imsi": cellular.usim.imsi,
            "iccid": cellular.usim.iccid,
            "msisdn": cellular.usim.msisdn,
            "rssi": cellular.rssi,
            "rsrp": cellular.rsrp,
            "rsrq": cellular.rsrq,
            "downloadMaxSpeed": cellular.downstream_max_bit_rate,
            "uploadMaxSpeed": cellular.upstream_max_bit_rate,
            "stats": cellular.stats
        }

    def _build_dsl_info(self, dsl):
        conn_type = "DSL"
        if dsl.current_profile:
            conn_type = f"DSL ({dsl.current_profile})"

        return {
            "connectionType": conn_type,
            "uptime": self._format_uptime(self.device_uptime_seconds),
            "ipAddress": self._get_ip_address(dsl),
            "dlSnr": dsl.downstream_noise_margin,
            "ulSnr": dsl.upstream_noise_margin,
            "dlMaxSpeed": dsl.downstream_max_bit_rate,
            "ulMaxSpeed": dsl.upstream_max_bit_rate,
            "dlAttenuation": dsl.downstream_attenuation,
            "ulAttenuation": dsl.upstream_attenuation,
            "stats": dsl.stats
        }

    def _format_uptime(self, uptime_seconds):
        # uptime_seconds = latest stored Device.DeviceInfo.UpTime, None when unknown
        if uptime_seconds is None:
            return "N/A"
        return format_uptime(uptime_seconds)

Parameter Summary Table

Parameter Ethernet Fiber Mobile DSL

Connection Type

Ethernet

Fiber

Mobile (Tech)

DSL (Profile)

Uptime

DeviceInfo.UpTime

DeviceInfo.UpTime

DeviceInfo.UpTime

DeviceInfo.UpTime

IP Address

IP.Interface

IP.Interface

IP.Interface

IP.Interface

Technology/Profile

—

—

CurrentAccessTechnology

CurrentProfile

Signal Quality

—

OpticalSignalLevel

RSSI, RSRP, RSRQ

DL/UL SNR

Speed

CurrentBitRate

MaxBitRate

DL/UL MaxBitRate

DL/UL MaxBitRate

Attenuation

—

—

—

DL/UL Attenuation

Traffic Stats

Stats.*

Stats.*

Stats.*

Stats.*