An open API service indexing awesome lists of open source software.

https://github.com/vmware/pmd

Photon Management Daemon
https://github.com/vmware/pmd

Last synced: 8 months ago
JSON representation

Photon Management Daemon

Awesome Lists containing this project

README

          

# NOTE

The pmd-next-gen official Git repository has been moved to: [pmd-next-gen](https://github.com/vmware/pmd-next-gen)
Access to a clone of the repository is available as below:
```bash
git clone git@github.com:vmware/pmd-next-gen.git
```

## photon-mgmtd

`photon-mgmtd` is a high performance open-source, simple, and pluggable REST API gateway designed with stateless architecture. It is written in Go, and built with performance in mind. It features real time health monitoring, configuration and performance for systems (containers), networking and applications.

- Proactive Monitoring and Analytics
easy to gather statistics and perform analyses.
- Platform independent REST APIs can be accessed via any application (curl, chrome, PostMan ...) from any OS (Linux, IOS, Android, Windows ...)
- Minimal data transfer using JSON.
- Plugin based Architechture. See how to write plugin section for more information.

### Features!

|Feature| Details |
| ------ | ------ |
|systemd | information, services (start, stop, restart, status), service properties for example CPUShares
see information from ```/proc``` fs| netstat, netdev, memory , vms, ARP and much more
system | fetch and configure system information for example hostname
network | fetch and configure network information example (dns, iostat, interface)
network link | configure network link parameters like (dhcp, linkLocalAddressing, multicastDNS, Address, route, domains, dns, ntp, ipv6AcceptRA, mode, mtubytes, mac, group, requiredFamilyForOnline, activationPolicy, routingPolicyRule, DHCPv4, DHCPv6, DHCPServer, Ipv6SendRA) etc
login | fetch list of users and sessions also get information for a id
network devices | create and remove virtual network devices like (Vlan, Bond, Bridge, MacVLan, IpVLan, VxLan, WireGuard) etc
ethtool | fetch ethernet settings for a link also based on a action
sysctl | used to fetch, set, load and automate kernel parameters
user | used to fetch, add, and remove user on the system
group | used to fetch, add, and remove group on the system
link | configure link parameters like (MACAddress, Name, AlternativeNames, Offload, VLANTAG, CHannels, Buffers, Queues, FlowControls, Coalesce) etc
firewall | add, delete and show nft tables, chain and rules also is used to run any NFT commands
package management (tdnf) | used to manage package management on the system like (list, info, download, update, remove, clean cache, list repositories, search package) etc

#### Building and installation from source
----

```bash

❯ make build
❯ sudo make install
```

Due to security `photon-mgmtd` runs in non root user `photon-mgmt`. It drops all privileges except `CAP_NET_ADMIN` and `CAP_SYS_ADMIN`.

```bash

❯ useradd -M -s /usr/bin/nologin photon-mgmt
```

#### Configuration
----

Configuration file `mgmt.toml` located in `/etc/photon-mgmt/` directory to manage the configuration.

The `[System]` section takes following Keys:

`LogLevel=`

Specifies the log level. Takes one of `Trace`, `Debug`, `Info`, `Warning`, `Error`, `Fatal` and `Panic`. Defaults to `info`. See [sirupsen](https://github.com/sirupsen/logrus#level-logging)

`UseAuthentication=`
A boolean. Specifies whether the users should be authenticated. Defaults to `true`.

The `[Network]` section takes following Keys:

`Listen=`
Specifies the IP address and port which the REST API server will listen to. When enabled, defaults to `127.0.0.1:5208`.

`ListenUnixSocket=`
A boolean. Specifies whether the server would listen on a unix domain socket `/run/photon-mgmt/mgmt.sock`. Defaults to `true`.

Note that when both `ListenUnixSocket=` and `Listen=` are enabled, server listens on the unix domain socket by default.
```bash
❯ sudo cat /etc/photon-mgmt/mgmt.toml
[System]
LogLevel="debug"
UseAuthentication="false"

[Network]
ListenUnixSocket="true"
```

```bash
❯ sudo systemctl start photon-mgmtd
```

```bash
❯ sudo systemctl status photon-mgmtd
● photon-mgmtd.service - A REST API based configuration management microservice gateway
Loaded: loaded (8;;file://zeus/usr/lib/systemd/system/photon-mgmtd.service^G/usr/lib/systemd/system/photon-mgmtd.service8;;^G; enabled; preset: enabled)
Active: active (running) since Thu 2023-01-26 11:34:05 UTC; 2min 44s ago
Main PID: 668 (photon-mgmtd)
Tasks: 6 (limit: 18735)
Memory: 22.8M
CGroup: /system.slice/photon-mgmtd.service
└─668 /usr/bin/photon-mgmtd

Jan 26 11:34:05 zeus systemd[1]: photon-mgmtd.service: Changed dead -> running
Jan 26 11:34:05 zeus systemd[1]: photon-mgmtd.service: Job 185 photon-mgmtd.service/start finished, result=done
Jan 26 11:34:05 zeus systemd[1]: Started A REST API based configuration management microservice gateway.
Jan 26 11:34:05 zeus systemd[668]: photon-mgmtd.service: Executing: /usr/bin/photon-mgmtd
Jan 26 11:34:05 zeus photon-mgmtd[668]: time="2023-01-26T11:34:05Z" level=info msg="photon-mgmtd: v0.1 (built go1.19.3)"
Jan 26 11:34:05 zeus photon-mgmtd[668]: time="2023-01-26T11:34:05Z" level=info msg="Starting photon-mgmtd... Listening on unix domain socket='/run/photon-mgmt/mgmt.sock' in HTTP>
Jan 26 11:36:43 zeus systemd[1]: photon-mgmtd.service: Trying to enqueue job photon-mgmtd.service/start/replace
Jan 26 11:36:43 zeus systemd[1]: photon-mgmtd.service: Installed new job photon-mgmtd.service/start as 596
Jan 26 11:36:43 zeus systemd[1]: photon-mgmtd.service: Enqueued job photon-mgmtd.service/start as 596
Jan 26 11:36:43 zeus systemd[1]: photon-mgmtd.service: Job 596 photon-mgmtd.service/start finished, result=done
```

#### pmctl
----

`pmctl` is a CLI tool allows to view and configure system/network/service status.

```bash
❯ sudo pmctl service status systemd-networkd
Name: systemd-networkd.service
Description: Network Configuration
Main Pid: 644
Load State: loaded
Active State: active
Sub State: running
Unit File State: enabled
State Change TimeStamp: Thu Jan 26 11:34:05 UTC 2023
Active Enter Timestamp: Thu Jan 26 11:34:05 UTC 2023
Inactive Exit Timestamp: Thu Jan 26 11:34:04 UTC 2023
Active Exit Timestamp: 0
Inactive Exit Timestamp: Thu Jan 26 11:34:04 UTC 2023
Active: active (running) since Thu Jan 26 11:34:05 UTC 2023

```

#### Configure system hostname
```bash
❯ pmctl system set-hostname static ubuntu transient transientname pretty prettyname
```

#### Acquire system status
```bash
❯ sudo pmctl status system
System Name: zeus
Kernel: Linux (5.10.159-2.ph4) #1-photon SMP Tue Jan 3 21:27:11 UTC 2023
Chassis: vm
Hardware Model: VMware Virtual Platform
Hardware Vendor: VMware, Inc.
Product UUID: 979e4d56b63718b18534e112e64cb18
Operating System: VMware Photon OS/Linux
Operating System Home URL: https://vmware.github.io/photon/
Time zone: UTC (2023-01-26 11:42:49.847435 +0000 UTC)
NTP synchronized: true
Time: Thu Jan 26 11:42:49 UTC 2023
RTC Time: 2023-01-26 11:42:49.847435 +0000 UTC
Systemd Version: v252-1
Architecture: x86-64
Virtualization: vmware
Network State: routable (carrier)
Network Online State: partial
DNS: 172.16.130.2
Address: 172.16.130.132/24 on device ens33
172.16.130.131/24 on device ens33
fe80::3279:c56d:55f9:aed7/64 on device ens33
172.16.130.138/24 on device ens37
Gateway: 172.16.130.2 on device ens37
172.16.130.2 on device ens33
Uptime: Running Since (17 hours 58 minutes) Booted (Sun Feb 5 22:41:12 IST 2023) Users (5) Proc (278)
Memory: Total (13559750656) Used (13559750656) Free (5929107456) Available (10282934272)
```

#### Network status
```bash
❯ sudo pmctl status network -i eth0
Name: eth0
Alternative Names: eno1 enp11s0 ens192
Index: 2
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/99-dhcp-en.network
Type: ether
State: routable ()
Driver: vmxnet3
Vendor: VMware
Model: VMXNET3 Ethernet Controller
Path: pci-0000:0b:00.0
Carrier State: carrier
Online State: online
IPv4Address State: routable
IPv6Address State: degraded
HW Address: 00:0c:29:64:cb:18
MTU: 1500
OperState: up
Flags: up|broadcast|multicast
Addresses: 172.16.130.132/24 172.16.130.131/24 fe80::3279:c56d:55f9:aed7/64
Gateway: 172.16.130.2
DNS: 172.16.130.2
```

#### Network dns status
```bash
> pmctl status network dns
Global

DNS: 8.8.8.1 8.8.8.2
DNS Domains: test3.com test4.com . localdomain . localdomain
Link 2 (ens33)
Current DNS Server: 172.16.61.2
DNS Servers: 172.16.61.2

Link 3 (ens37)
Current DNS Server: 172.16.61.2
DNS Servers: 172.16.61.2
```

#### Network iostat status
```bash
> pmctl status network iostat
Name: lo
Packets received: 7510
Bytes received: 7510
Bytes sent: 7510
Drop in: 7510
Drop out: 0
Error in: 0
Error out: 0
Fifo in: 0
Fifo out: 0

Name: ens33
Packets received: 46014
Bytes received: 19072
Bytes sent: 19072
Drop in: 19072
Drop out: 0
Error in: 0
Error out: 0
Fifo in: 0
Fifo out: 0

Name: ens37
Packets received: 9682
Bytes received: 10779
Bytes sent: 10779
Drop in: 10779
Drop out: 0
Error in: 0
Error out: 0
Fifo in: 0
Fifo out: 0
```

#### Network interfaces status
```bash
> pmctl status network interfaces
Name: lo
Index: 1
MTU: 65536
Flags: up loopback
Hardware Address:
Addresses: 127.0.0.1/8 ::1/128

Name: ens33
Index: 2
MTU: 1500
Flags: up broadcast multicast
Hardware Address: 00:0c:29:7c:6f:84
Addresses: 172.16.61.128/24 fe80::c099:2598:cc4c:14d1/64

Name: ens37
Index: 3
MTU: 1500
Flags: up broadcast multicast
Hardware Address: 00:0c:29:7c:6f:8e
Addresses: 172.16.61.134/24 fe80::be9:7746:7729:3e2/64
```

#### Login status
```bash

# List Users
>pmctl status login user

# List Sessions
>pmctl status login session

# Acquire User based on UID
pmctl status login user
>pmctl status login user 2

# Acquire Session based on ID
pmctl status login session
>pmctl status login session 1000

```

#### Ethtool status
```bash

# Acquire Ethtool all status
pmctl status ethtool
>pmctl status ethtool ens37

# Acquire Ethtool status based on action
pmctl status ethtool
>pmctl status ethtool ens37 bus

```

#### sysctl usecase via pmctl
```bash

# Acquire all sysctl configuration in the system in json format.
pmctl status sysctl

# Acquire one variable configuration from sysctl configuration.
pmctl status sysctl k
or
pmctl status sysctl key

>pmctl status sysctl k fs.file-max
fs.file-max: 9223372036854775807

# Acquire all variable configuration from sysctl configuration based on input pattern.
pmctl status sysctl p
or
pmctl status sysctl pattern

>pmctl status sysctl p net.ipv6.route.gc
{"net.ipv6.route.gc_elasticity":"9","net.ipv6.route.gc_interval":"30","net.ipv6.route.gc_min_interval":"0","net.ipv6.route.gc_min_interval_ms":"500","net.ipv6.route.gc_thresh":"1024","net.ipv6.route.gc_timeout":"60"}

# Add or Update a variable configuration in sysctl configuration.
pmctl sysctl u -k -v -f
or
pmctl sysctl update key value filename

>pmctl sysctl u -k fs.file-max -v 65566 -f 99-sysctl.conf
>pmctl sysctl u -k fs.file-max -v 65566

# Remove a variable configuration from sysctl configuration.
pmctl sysctl r -k -f
or
pmctl sysctl remove key filename

>pmctl sysctl r -k fs.file-max -f 99-sysctl.conf
>pmctl sysctl r -k fs.file-max

# Load sysctl configuration files.
pmctl sysctl l -f
or
pmctl sysctl load files

>pmctl sysctl l -f 99-sysctl.conf,70-sysctl.conf
>pmctl sysctl l -f
```

#### sysctl usecase via curl
```bash

# Acquire all sysctl configuration in the system in json format.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/sysctl/statusall
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/sysctl/statusall

# Acquire one variable configuration from sysctl configuration.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET --data '{"key":""}' http://localhost/api/v1/system/sysctl/status
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET --data '{"key":"fs.file-max"}' http://localhost/api/v1/system/sysctl/status

# Acquire all variable configuration from sysctl configuration based on input pattern.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET --data '{"pattern":""}' http://localhost/api/v1/system/sysctl/statuspattern
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET --data '{"pattern":"fs.file"}' http://localhost/api/v1/system/sysctl/statuspattern

# Add or Update a variable configuration in sysctl configuration.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"apply":true,"key":"","value":"","filename":""}' http://localhost/api/v1/system/sysctl/update
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"apply":true,"key":"fs.file-max","value":"65409","filename":"99-sysctl.conf"}' http://localhost/api/v1/system/sysctl/update

# Remove a variable configuration from sysctl configuration.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request DELETE --data '{"apply":true,"key":"","filename":""}' http://localhost/api/v1/system/sysctl/remove
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request DELETE --data '{"apply":true,"key":"fs.file-max","filename":"99-sysctl.conf"}' http://localhost/api/v1/system/sysctl/remove

# Load sysctl configuration files.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"apply":true,"files":["",""]}' http://localhost/api/v1/system/sysctl/load
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"apply":true,"files":["99-sysctl.conf","75-sysctl.conf"]}' http://localhost/api/v1/system/sysctl/load
```

#### Group usecase via pmctl
```bash

# Acquire all Group information.
>pmctl status group
Gid: 0
Name: root

Gid: 1
Name: daemon

Gid: 2
Name: bin

Gid: 3
Name: sys

Gid: 4
Name: adm
.
.
.
Gid: 1001
Name: photon-mgmt

# Fetch a group information.
pmctl status group
or
pmctl status group

>pmctl status group photon-mgmt
Gid: 1001
Name: photon-mgmt

# Add a new Group.
pmctl group add
or
pmctl group add

# Remove a Group.
pmctl group remove
or
pmctl group remove
```

#### Group usecase via curl
```bash

# Acquire all Group information.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/group/view

# Acquire one Group information.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/group/view/

# Add a new Group.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"Name":"","Gid":""}' http://localhost/api/v1/system/group/add
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"Name":"nk1","Gid":"101"}' http://localhost/api/v1/system/group/add

# Remove a Group.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request DELETE --data '{"Name":"","Gid":""}' http://localhost/api/v1/system/group/remove
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request DELETE --data '{"Name":"photon-mgmt","Gid":"101"}' http://localhost/api/v1/system/group/remove
```

#### User usecase via pmctl
```bash

# Acquire all User information.
>pmctl status user
User Name: root
Uid: 0
Gid: 0
GECOS: root
Home Directory: /root

User Name: daemon
Uid: 1
Gid: 1
GECOS: daemon
Home Directory: /usr/sbin

User Name: bin
Uid: 2
Gid: 2
GECOS: bin
Home Directory: /bin

User Name: sys
Uid: 3
Gid: 3
GECOS: sys
Home Directory: /dev

User Name: photon-mgmt
Uid: 1001
Gid: 1001
Home Directory: /home/photon-mgmt

# Add a new User.
pmctl user add home-dir groups uid gid shell password
or
pmctl user a -d -grp -u -g -s -p

# Remove a User.
pmctl user remove
or
pmctl user r
```

#### User usecase via curl
```bash

# Acquire all User information.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/user/view

# Add a new User.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"Name":"","Uid":"","Gid":"","Groups":["group1","group2"],""HomeDirectory":"","Shell":"","Comment":"","Password":""}' http://localhost/api/v1/system/user/add
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"Name":"nts1","Uid":"","Gid":"1004","Groups":["nts","group2"],"HomeDirectory":"home/nts","Shell":"","Comment":"hello","Password":"unknown"}' http://localhost/api/v1/system/user/add

# Remove a User.
curl --unix-socket /run/photon-mgmt/mgmt.sock --request DELETE --data '{"Name":""}' http://localhost/api/v1/system/user/remove
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request DELETE --data '{"Name":"nts1"}' http://localhost/api/v1/system/user/remove
```

#### Configure network link section using pmctl
```bash

# Configure network dhcp
pmctl network set-dhcp
>pmctl network set-dhcp ens37 ipv4

# Configure network linkLocalAddressing
pmctl network set-link-local-addr
>pmctl network set-link-local-addr ens37 ipv4

# Configure network multicastDNS
pmctl network set-multicast-dns
>pmctl network set-multicast-dns ens37 resolve

# Configure network address
pmctl network add-link-address address

peer
label scope
>pmctl network add-link-address ens37 address 192.168.0.15/24 peer 192.168.10.10/24 label ipv4 scope link

# Configure network sriov
pmctl network add-sriov dev vf vlanid qos vlanproto macsfc qrss trust linkstate macaddr
>pmctl network add-sriov dev ens37 vf 2 vlanid 1 qos 1024 vlanproto 802.1Q macsfc yes qrss yes trust yes linkstate auto macaddr 00:0c:29:3a:bc:11

# Configure network route
pmctl network add-route dev gw gwonlink src dest prefsrc table scope
>pmctl network add-route dev ens33 gw 192.168.1.0 gwonlink no src 192.168.1.15/24 dest 192.168.10.10/24 prefsrc 192.168.8.9 table 1234 scope link

# Configure network dns
pmctl network add-dns dev dns
>pmctl network add-dns dev ens37 dns 8.8.8.8,8.8.4.4,8.8.8.1,8.8.8.2

#Configure network domains
pmctl network add-domain dev domains
>pmctl network add-domain dev ens37 domains test1.com,test2.com,test3.com,test4.com

#Configure network ntp
pmctl network add-ntp dev ntp
>pmctl network add-ntp dev ens37 ntp 198.162.1.15,test3.com

# Configure network ipv6AcceptRA
pmctl network set-ipv6-accept-ra
>pmctl network set-ipv6-accept-ra ens37 false

# Configure link mode
pmctl network set-link-mode dev mode arp mc amc pcs rfo
>pmctl network set-link-mode dev ens37 arp 1 mc no amc true pcs yes rfo on

# Configure link mtubytes
pmctl network set-mtu
>pmctl network set-mtu ens37 2048

# Configure link mac
pmctl network set-mac
>pmctl network set-gmac ens37 00:a0:de:63:7a:e6

# Configure link group
pmctl network set-group
>pmctl network set-group ens37 2147483647

# Configure link requiredFamilyForOnline
pmctl network set-rf-online
>pmctl network set-rf-online ens37 ipv4

# Configure link activationPolicy
pmctl network set-active-policy
>pmctl network set-active-policy ens37 always-up

# Configure network routingPolicyRule
pmctl network add-rule dev tos from

to
fwmark table prio iif oif srcport destport ipproto invertrule family usr suppressprefixlen suppressifgrp type
>pmctl network add-rule dev ens37 tos 12 from 192.168.1.10/24 to 192.168.2.20/24 fwmark 7/255 table 8 prio 3 iif ens37 oif ens37 srcport 8000-8080 destport 9876 ipproto 17 invertrule yes family ipv4 usr 1001 suppressprefixlen 128 suppressifgrp 2098 type prohibit

# Remove network routingPolicyRule
pmctl network delete-rule dev tos from

to
fwmark table prio iif oif srcport destport ipproto invertrule family usr suppressprefixlen suppressifgrp type
>pmctl network delete-rule dev ens37 tos 12 from 192.168.1.10/24 to 192.168.2.20/24 fwmark 7/255 table 8 prio 3 iif ens37 oif ens37 srcport 8000-8080 destport 9876 ipproto 17 invertrule yes family ipv4 usr 1001 suppressprefixlen 128 suppressifgrp 2098 type prohibit

# Configure network DHCPv4 id's
pmctl network set-dhcpv4-id dev clientid vendorclassid iaid
>pmctl network set-dhcpv4-id dev ens37 clientid duid vendorclassid 101 iaid 201

# Configure network DHCPv4 duid
pmctl network set-dhcpv4-duid dev duidtype duidrawdata
>pmctl network set-dhcpv4-duid dev ens37 duidtype vendor duidrawdata af:03:ff:87

# Configure network DHCPv4 use options
pmctl network set-dhcpv4-use dev usedns usentp usesip usemtu usehostname usedomains useroutes usegateway usetimezone
>pmctl network set-dhcpv4-use dev ens37 usedns false usentp false usesip false usemtu yes usehostname true usedomains yes useroutes no usegateway yes usetimezone no

# Configure network DHCPv6
pmctl network set-dhcpv6 dev mudurl userclass vendorclass prefixhint withoutra
>pmctl network set-dhcpv6 dev ens37 mudurl https://example.com/devB userclass usrcls1,usrcls2 vendorclass vdrcls1 prefixhint 2001:db1:fff::/64 withoutra solicit

# Configure network DHCPv6 id's
pmctl network set-dhcpv6-id dev iaid duidtype duidrawdata
>pmctl network set-dhcpv6-id dev ens37 iaid 201 duidtype vendor duidrawdata af:03:ff:87

# Configure network DHCPv6 Use
pmctl network set-dhcpv6-use dev useaddr useprefix usedns usentp usehostname usedomains
>pmctl network set-dhcpv6-use dev ens37 useaddr yes useprefix no usedns false usentp false usehostname true usedomains yes

# Configure network DHCPv6 Options
pmctl network set-dhcpv6-option dev reqopt sendopt sendvendoropt
>pmctl network set-dhcpv6-option dev ens37 reqopt 10,198,34 sendopt 34563 sendvendoropt 1987653,65,ipv6address,af:03:ff:87

# Configure network DHCPServer
pmctl network add-dhcpv4-server dev pool-offset pool-size default-lease-time-sec max-lease-time-sec dns emit-dns emit-ntp emit-router
>pmctl network add-dhcpv4-server dev ens37 pool-offset 100 pool-size 200 default-lease-time-sec 10 max-lease-time-sec 30 dns 192.168.1.2,192.168.10.10,192.168.20.30 emit-dns yes emit-ntp no emit-router yes

# Remove network DHCPServer
pmctl network remove-dhcpv4-server
>pmctl network remove-dhcpv4-server ens37

# Configure network IPv6SendRA
pmctl network add-ipv6ra dev rt-pref emit-dns dns emit-domains domains dns-lifetime-sec prefix pref-lifetime-sec valid-lifetime-sec assign route lifetime-sec
>pmctl network add-ipv6ra dev ens37 rt-pref medium emit-dns yes dns 2002:da8:1::1,2002:da8:2::1 emit-domains yes domains test1.com,test2.com dns-lifetime-sec 100 prefix 2002:da8:1::/64 pref-lifetime-sec 100 valid-lifetime-sec 200 assign yes route 2001:db1:fff::/64 lifetime-sec 1000

# Remove network IPv6SendRA
pmctl network remove-ipv6ra
>pmctl network remove-ipv6ra ens37

```

#### Configure network device using pmctl
```bash
# Configure VLan
pmctl network create-vlan dev id
>pmctl network create-vlan vlan1 dev ens37 id 101

# Configure Bond
pmctl network create-bond dev mode thp ltr mms
>pmctl network create-bond bond1 dev ens37,ens38 mode 802.3ad thp layer2+3 ltr slow mms 1s

# Configure Bond with default
>pmctl network create-bond bond1 dev ens37,ens38

# Configure Bridge with default
pmctl network create-bridge dev
>pmctl network create-bridge br0 dev ens37,ens38

# Configure MacVLan
pmctl network create-macvlan dev mode
>pmctl network create-macvlan macvlan1 dev ens37 mode private

# Configure IpVLan
pmctl network create-ipvlan dev mode flags
>pmctl network create-ipvlan ipvlan1 dev ens37 mode l2 flags vepa

# Configure IpVLan with default
>pmctl network create-ipvlan ipvlan1 dev ens38

# Configure VxLan
pmctl network create-vxlan dev remote local group destport independent
>pmctl network create-vxlan vxlan1 dev ens37 vni 16777215 remote 192.168.1.3 local 192.168.1.2 group 192.168.0.0 destport 4789 independent no

# Configure WireGuard
pmctl network create-wg dev skey pkey endpoint port ips
>pmctl network create-wg wg1 dev ens37 skey wCmc/74PQpRoxTgqGircVFtdArZFUFIiOoyQY8kVgmI= pkey dSanSzExlryduCwNnAFt+rzpI5fKeHuJx1xx2zxEG2Q= endpoint 10.217.69.88:51820 port 51822 ips fd31:bf08:57cb::/48,192.168.26.0/24

# Configure WireGuard with default
>pmctl network create-wg wg1 dev ens37 skey wCmc/74PQpRoxTgqGircVFtdArZFUFIiOoyQY8kVgmI= pkey dSanSzExlryduCwNnAFt+rzpI5fKeHuJx1xx2zxEG2Q= endpoint 10.217.69.88:51820

# Configure Tun
pmctl network create-tun dev mq pktinfo vnet-hdr usr grp