.. _object_WiredNetworkInterface: :index:`WiredNetworkInterface` ------------------------------ Description *********** The WiredNetworkInterface object represents one of the wired (ethernet) network interfaces of the device. The :ref:`mode ` property allows defining the network configuration method (static/DHCP). When working with static addresses many additional properties allow detailled configuration and customization. Additionally the provided configuration items can be used to make the settings available to generic property-based frontends. :**› Inherits**: :ref:`NetworkInterface ` Overview ******** Properties ++++++++++ .. hlist:: :columns: 3 * :ref:`address ` * :ref:`addressItem ` * :ref:`dhcpServer ` * :ref:`dns ` * :ref:`dnsItem ` * :ref:`domains ` * :ref:`domainsItem ` * :ref:`gateway ` * :ref:`gatewayItem ` * :ref:`index ` * :ref:`indexItem ` * :ref:`ipv6AutoConfig ` * :ref:`ipv6AutoConfigItem ` * :ref:`linkLocalAddressing ` * :ref:`linkLocalAddressingItem ` * :ref:`mode ` * :ref:`modeItem ` * :ref:`multicastDNS ` * :ref:`multicastDNSItem ` * :ref:`subnetPrefixLength ` * :ref:`subnetPrefixLengthItem ` * :ref:`vlan ` * :ref:`vlanItem ` * :ref:`NetworkInterface.bytesRx ` * :ref:`NetworkInterface.bytesTx ` * :ref:`NetworkInterface.dhcpClientIdentifier ` * :ref:`NetworkInterface.enabled ` * :ref:`NetworkInterface.enabledItem ` * :ref:`NetworkInterface.error ` * :ref:`NetworkInterface.errorString ` * :ref:`NetworkInterface.hardwareAddress ` * :ref:`NetworkInterface.hardwareAddressItem ` * :ref:`NetworkInterface.hardwareName ` * :ref:`NetworkInterface.networkAddresses ` * :ref:`NetworkInterface.ntp ` * :ref:`NetworkInterface.ntpItem ` * :ref:`NetworkInterface.operationalState ` * :ref:`NetworkInterface.routes ` * :ref:`NetworkInterface.setupState ` * :ref:`NetworkInterface.trafficRx ` * :ref:`NetworkInterface.trafficTx ` * :ref:`NetworkInterface.useRoutes ` * :ref:`NetworkInterface.useRoutesItem ` * :ref:`ConfigurationObject.items ` * :ref:`ConfigurationObject.name ` * :ref:`ConfigurationObject.nameItem ` * :ref:`Object.objectId ` * :ref:`Object.parent ` Methods +++++++ .. hlist:: :columns: 2 * :ref:`NetworkInterface.pollBytesRx() ` * :ref:`NetworkInterface.pollBytesTx() ` * :ref:`NetworkInterface.pollTrafficRx() ` * :ref:`NetworkInterface.pollTrafficTx() ` * :ref:`ConfigurationObject.toDataMap() ` * :ref:`Object.deserializeProperties() ` * :ref:`Object.fromJson() ` * :ref:`Object.serializeProperties() ` * :ref:`Object.toJson() ` Signals +++++++ .. hlist:: :columns: 1 * :ref:`NetworkInterface.errorOccurred() ` * :ref:`NetworkInterface.routesDataChanged() ` * :ref:`ConfigurationObject.aboutToBeUpdated() ` * :ref:`ConfigurationObject.itemsDataChanged() ` * :ref:`ConfigurationObject.updated() ` * :ref:`Object.completed() ` Enumerations ++++++++++++ .. hlist:: :columns: 1 * :ref:`Index ` * :ref:`Mode ` * :ref:`NetworkInterface.DhcpClientIdentifier ` * :ref:`NetworkInterface.Error ` * :ref:`NetworkInterface.OperationalState ` * :ref:`NetworkInterface.SetupState ` Properties ********** .. _property_WiredNetworkInterface_address: .. _signal_WiredNetworkInterface_addressChanged: .. index:: single: address address +++++++ This property holds a static IPv4 or IPv6 address for this interface and optionally its subnet prefix length, separated by a ``/`` character, e.g. ``192.168.2.19/24``. Multiple addresses (including prefix) can be specified and separated by space. :**› Type**: String :**› Signal**: addressChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_addressItem: .. index:: single: addressItem addressItem +++++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`address ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_dhcpServer: .. _signal_WiredNetworkInterface_dhcpServerChanged: .. index:: single: dhcpServer dhcpServer ++++++++++ This property holds an optional :ref:`DhcpServer ` object which defines settings for a DHCP server started on this interface. This may be required when TCP/IP-based sensor and I/O modules are connected to this interface and obtain their configuration through DHCP. :**› Type**: :ref:`DhcpServer ` :**› Signal**: dhcpServerChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_dns: .. _signal_WiredNetworkInterface_dnsChanged: .. index:: single: dns dns +++ This property holds a list of DNS servers which should be used for resolving hostnames to IP addresses. Multiple server addresses can be specified and separated by space. Each server address has to be a valid IPv4 or IPv6 address. :**› Type**: String :**› Signal**: dnsChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_dnsItem: .. index:: single: dnsItem dnsItem +++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`dns ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_domains: .. _signal_WiredNetworkInterface_domainsChanged: .. index:: single: domains domains +++++++ This property holds a list of DNS search domains which should be resolved using the DNS servers on this interface. See the `Domains description in the systemd-networkd manpage `_ for details on syntax and semantics. :**› Type**: String :**› Signal**: domainsChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_domainsItem: .. index:: single: domainsItem domainsItem +++++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`domains ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_gateway: .. _signal_WiredNetworkInterface_gatewayChanged: .. index:: single: gateway gateway +++++++ This property holds the gateway address for this interface. This is required to communicate with hosts outside of the configured subnet. Multiple gateways can be specified and separated by space. Each gateway address has to be a valid IPv4 or IPv6 address. :**› Type**: String :**› Signal**: gatewayChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_gatewayItem: .. index:: single: gatewayItem gatewayItem +++++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`gateway ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_index: .. _signal_WiredNetworkInterface_indexChanged: .. index:: single: index index +++++ This property holds which physical network interface to configure through a certain instance. :**› Type**: :ref:`Index ` :**› Default**: :ref:`WiredNetworkInterface.EthernetNone ` :**› Signal**: indexChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_indexItem: .. index:: single: indexItem indexItem +++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`index ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_ipv6AutoConfig: .. _signal_WiredNetworkInterface_ipv6AutoConfigChanged: .. index:: single: ipv6AutoConfig ipv6AutoConfig ++++++++++++++ This property holds whether to enable IPv6 auto configuration support. When enabled IPv6 Router Advertisements are received and processed and the DHCPv6 client is enabled on this interface. See the `IPv6AcceptRA description in the systemd-networkd manpage `_ for details. :**› Type**: Boolean :**› Default**: ``true`` :**› Signal**: ipv6AutoConfigChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_ipv6AutoConfigItem: .. index:: single: ipv6AutoConfigItem ipv6AutoConfigItem ++++++++++++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`ipv6AutoConfig ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_linkLocalAddressing: .. _signal_WiredNetworkInterface_linkLocalAddressingChanged: .. index:: single: linkLocalAddressing linkLocalAddressing +++++++++++++++++++ This property holds whether to enable link-local address autoconfiguration. See `Link-local address `_ for details. :**› Type**: Boolean :**› Default**: ``true`` :**› Signal**: linkLocalAddressingChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_linkLocalAddressingItem: .. index:: single: linkLocalAddressingItem linkLocalAddressingItem +++++++++++++++++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`linkLocalAddressing ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_mode: .. _signal_WiredNetworkInterface_modeChanged: .. index:: single: mode mode ++++ This property holds the configuration mode for this network interface. When set to :ref:`WiredNetworkInterface.ModeStatic ` at least the :ref:`address ` property has to be specified as well. Depending on the desired purpose of the interface, the :ref:`dns ` and :ref:`gateway ` properties should be configured as well. :**› Type**: :ref:`Mode ` :**› Default**: :ref:`WiredNetworkInterface.ModeNone ` :**› Signal**: modeChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_modeItem: .. index:: single: modeItem modeItem ++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`mode ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_multicastDNS: .. _signal_WiredNetworkInterface_multicastDNSChanged: .. index:: single: multicastDNS multicastDNS ++++++++++++ This property holds whether to enable multicast DNS support on this interface. When enabled, the device can be accessed via :ref:`System.hostname `.local in the network. See `Multicast DNS `_ and `RFC 6762 `_ for details. :**› Type**: Boolean :**› Default**: ``true`` :**› Signal**: multicastDNSChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_multicastDNSItem: .. index:: single: multicastDNSItem multicastDNSItem ++++++++++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`multicastDNS ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_subnetPrefixLength: .. _signal_WiredNetworkInterface_subnetPrefixLengthChanged: .. index:: single: subnetPrefixLength subnetPrefixLength ++++++++++++++++++ This property holds the subnet prefix length for the static IPv4 or IPv6 :ref:`address `. It is ignored if specified as part of the IP address already. Otherwise it has to be set to a value greater than ``0``, e.g. ``24`` for the IPv4 subnet mask ``255.255.255.0``. This property was introduced in InCore 2.6. :**› Type**: SignedInteger :**› Default**: ``0`` :**› Signal**: subnetPrefixLengthChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_subnetPrefixLengthItem: .. index:: single: subnetPrefixLengthItem subnetPrefixLengthItem ++++++++++++++++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`subnetPrefixLength ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly .. _property_WiredNetworkInterface_vlan: .. _signal_WiredNetworkInterface_vlanChanged: .. index:: single: vlan vlan ++++ This property holds the name of a VLAN to create on this interface. :**› Type**: String :**› Signal**: vlanChanged() :**› Attributes**: Writable .. _property_WiredNetworkInterface_vlanItem: .. index:: single: vlanItem vlanItem ++++++++ This property holds an internal :ref:`ConfigurationItem ` instance for the :ref:`vlan ` property. :**› Type**: :ref:`ConfigurationItem ` :**› Attributes**: Readonly Enumerations ************ .. _enum_WiredNetworkInterface_Index: .. index:: single: Index Index +++++ This enumeration describes indexes for all supported wireless network interfaces. .. index:: single: WiredNetworkInterface.EthernetNone .. index:: single: WiredNetworkInterface.Ethernet1 .. index:: single: WiredNetworkInterface.Ethernet2 .. list-table:: :widths: auto :header-rows: 1 * - Name - Value - Description .. _enumitem_WiredNetworkInterface_EthernetNone: * - ``WiredNetworkInterface.EthernetNone`` - ``0`` - The object does not represent a valid wired network interface. .. _enumitem_WiredNetworkInterface_Ethernet1: * - ``WiredNetworkInterface.Ethernet1`` - ``1`` - The object represents the first wired network interface. .. _enumitem_WiredNetworkInterface_Ethernet2: * - ``WiredNetworkInterface.Ethernet2`` - ``2`` - The object represents the second wired network interface. .. _enum_WiredNetworkInterface_Mode: .. index:: single: Mode Mode ++++ This enumeration describes all supported configuration modes for a wired network interface. .. index:: single: WiredNetworkInterface.ModeNone .. index:: single: WiredNetworkInterface.ModeStatic .. index:: single: WiredNetworkInterface.ModeDHCP .. list-table:: :widths: auto :header-rows: 1 * - Name - Value - Description .. _enumitem_WiredNetworkInterface_ModeNone: * - ``WiredNetworkInterface.ModeNone`` - ``0`` - Do not configure, i.e. disable the network interface. .. _enumitem_WiredNetworkInterface_ModeStatic: * - ``WiredNetworkInterface.ModeStatic`` - ``1`` - Configure one or multiple static addresses and servers. .. _enumitem_WiredNetworkInterface_ModeDHCP: * - ``WiredNetworkInterface.ModeDHCP`` - ``2`` - Configure the interface automatically via DHCP and IPv6 Router Advertisements. .. _example_WiredNetworkInterface: Example ******* .. code-block:: qml import InCore.Foundation 2.5 Application { NetworkConfiguration { // autoconfigure ethernet interface via DHCP WiredNetworkInterface { index: WiredNetworkInterface.Ethernet1 mode: WiredNetworkInterface.ModeDHCP } // configure ethernet interface with static settings WiredNetworkInterface { index: WiredNetworkInterface.Ethernet2 mode: WiredNetworkInterface.ModeStatic address: "192.168.2.19/24" gateway: "192.168.2.254" dns: "192.168.2.1 192.168.2.2" domains: "example.org" ntp: "ntp1.example.org ntp2.example.org" multicastDNS: true routes: [ NetworkRoute { destination: "192.168.3.0/24" gateway: "192.168.2.253" } ] } } }