Network Service¶
The Network Service is a gRPC & Go based network configuration service. The network settings of the Edge Devices are configured through this service.
Table of Contents¶
- Network.proto
- Interface
- Interface.Dns
- Interface.L2
- Interface.L2.AuxiliaryAddressesEntry
- Interface.StaticConf
- NetworkInterfaceRequest
- NetworkInterfaceRequestWithLabel
- NetworkSettings
Network.proto¶
Interface¶
Interface type holds settings for a Network Interface.
| Field | Type | Label | Description |
|---|---|---|---|
| GatewayInterface | bool | if true, route metric will be set to 1. Otherwise route metric is -1. Similarly, when the interface is requested,return value will be true if route metric is 1. | |
| MacAddress | string | "20:87:56:b5:ed:e0" | |
| DHCP | string | values can be 'enabled' or 'disabled'. for compatiblity reasons it is not boolean. | |
| Static | Interface.StaticConf | Static field is StaticConf type instance. | |
| DNSConfig | Interface.Dns | DNSConfig is dns type instance. | |
| L2Conf | Interface.L2 | ||
| InterfaceName | string | Network interface name e.g: "enp2s0" | |
| Label | string | Label for the interface e.g: "X1" |
These attributes are used by /info GET API in Industrial Edge Device API 2.4.1
Interface.Dns¶
Type that contains Primary and Secondary DNS.
| Field | Type | Label | Description |
|---|---|---|---|
| PrimaryDNS | string | e.g: "1.1.1.2" | |
| SecondaryDNS | string | e.g: "1.1.1.1" |
Interface.L2¶
| Field | Type | Label | Description |
|---|---|---|---|
| StartingAddressIPv4 | string | e.g: 192.168.0.2 | |
| NetMask | string | e.g: 255.255.255.0 | |
| Range | string | e.g: 16 | |
| Gateway | string | e.g: 192.168.2.1 | |
| AuxiliaryAddresses | Interface.L2.AuxiliaryAddressesEntry | repeated | Preserved addresses for other devices. These addresses won't be assigned to containers. e.g my_plc, 192.168.0.5 |
Interface.L2.AuxiliaryAddressesEntry¶
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
Interface.StaticConf¶
StaticConf type holds IP Netmask and Gateway information
| Field | Type | Label | Description |
|---|---|---|---|
| IPv4 | string | e.g: 192.168.0.2 | |
| NetMask | string | e.g: 255.255.255.0 | |
| Gateway | string | e.g: 192.168.0.1 |
NetworkInterfaceRequest¶
Contains MAC address, used for retrieving specified Network Interface settings.
| Field | Type | Label | Description |
|---|---|---|---|
| mac | string |
NetworkInterfaceRequestWithLabel¶
Returns an Network Interface with
| Field | Type | Label | Description |
|---|---|---|---|
| label | string |
NetworkSettings¶
Contains multiple network interface settings. It can be used to apply or get the settings.
| Field | Type | Label | Description |
|---|---|---|---|
| Interfaces | Interface | repeated | Network settings contains an array of Interfaces.Applying new settings or receiving current settings is supported for multiple ethernet typed network interfaces supported. |
| LabelMap | NetworkSettings.LabelMapEntry | repeated | LabelMap contains port label and corresponding interface-name. e.g key : x1 value: enp2s0 |
NetworkSettings.LabelMapEntry¶
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
NetworkService¶
Network service ,uses a UNIX Domain Socket "/var/run/devicemodel/network.sock" for GRPC communication. protoc generates both client and server instance for this Service. GRPC Status codes : https://developers.google.com/maps-booking/reference/grpc-api/status_codes .
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetAllInterfaces | .google.protobuf.Empty | NetworkSettings | Returns the settings of all ethernet typed network interfaces |
| GetInterfaceWithMac | NetworkInterfaceRequest | Interface | Returns the current setting for the interface, with given MAC address. |
| GetInterfaceWithLabel | NetworkInterfaceRequestWithLabel | Interface | Returns the current setting for the interface, with given Label. |
| ApplySettings | NetworkSettings | .google.protobuf.Empty | Applies given configurations to Network Interfaces. |
Scalar Value Types¶
Funding Acknowledgment: Funded by the Federal Ministry for Economic Affairs and Energy based on a decision by the German Bundestag | Your funding provider: Kicks for Edge as part of the EU funding program IPCEI-CIS (FKZ:13IPC008)