Introduction

What ?

Brain is like a draft notebook. A place to store all my notes.

Why ?

While browsering dev.to, I found this article :

Then I decide to give this concept a shot.

Licence

You can do whatever the fuck you want with this.

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                Version 2, December 2004

Copyright 2017 dashie

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

 0. You just DO WHAT THE FUCK YOU WANT TO.

Tips

Resources

Tools

Youtube channels

Ham

lic fr

License FR - Legislation

License FR - Technique

TOS & ROS

\[ TOS = \left(\sqrt{\frac{P_{ref}}{P_{ém}}}\right) \times 100 \]

\[ ROS = \frac{100 + TOS}{100 - TOS} \]

Resources

VNA

Spectrum Analyzer

Other

DBs Units

Refs

dB

A logarithmic expression of the ratio of two power levels: \[ 10 \times \log_{10}\left(\frac{P1}{P2}\right) \]

P1P2\( \frac{P1}{P2} \)dB
1110
2123
1011010
0.510.5-3
7.21.64.56.5
100110020
10001100030

Since a dB is a ratio, it is not an absolute quantity, like a watt, etc.

To make it an absolute quantity, we must specify a reference.

dB suffix

  • dBm -> reference is milliwatt (mW)
  • dbµ -> reference is microwatt (µW)
  • dBmV -> reference is millivolt (mV)

The suffix can turn dB into an absolute quantity dbM.

Example

10 MHz sinewave at 950mVpp into \( 50\Omega \).

\[ Vpp = 950mV \] \[ Vrms = \frac{Vpp}{2 \times \sqrt{2}} = \frac{950mV}{2 \times \sqrt{2}} = 336mV_{rms} \]

Therefore, the power in the \( 50\Omega \) load is:

\[ P = \frac{\left(Vrms\right)^2}{R} = \frac{0.336^2}{50} = 2.256mW \]

To express this in dBm, the reference is 1mW:

\[ dBm = 10\times\log_{10}\left(\frac{2.256mW}{1mW}\right) = 3.53dBm \]

In dBµ, the reference is 1µW:

\[ dBµ = 10\times\log\left(\frac{2.256 \times 10^{-3}}{1 \times 10^{-6}}\right) = 33.53dBµ \]

Voltage ratios

The dB relates to power, so we have to calculate power.

\[ 10\times\log\left[\frac{\frac{V1^2}{R}}{\frac{V2^2}{R}}\right] \]

\[ 10\times\log\left[\frac{V1^2}{R}\times\frac{R}{V2^2}\right] \]

\[ 10\times\log\left[\frac{V1^2}{V2^2}\right] \]

\[ 10\times\log\left[\left(\frac{V1}{V2}\right)^2\right] \]

\[ 2\times10\times\log\left[\frac{V1}{V2}\right] \]

\[ 20\times\log\left[\frac{V1}{V2}\right] \]

Thus, our 950mVpp can be expressed in dBmv

\[ V = \sqrt{P \times R} \]

\[ dBmv = 20\times\log\left(\frac{336mV}{1mV}\right) = 50.5dBmV \]

What about dBc ?

  • dBc means it is dB relative to some "carrier" power leev

  • very common in RF applications

dBs / table

chart1 chart2

Cable impedance

Take a cable section, and measures:

  • LCR in C, connected to one end, other is open
  • LCR in L, connected to one end, other is shorted

Use formula:

\[ Z = \sqrt{\frac{L}{C}} \]

C = 37.2pF

L = 0.10µH = 100nH

\[ Z = \sqrt{\frac{100 \times 10^{-9}}{37.2 \times 10^{-12}}} = 51.8\Omega \]

End-Fed Half-Wave

Length of wanted wire: \[ meters = \frac{300}{frequency in mhz} \]

Eg for 80m: \[ \frac{300}{3.5600} = 84.270 \]

Cut in half for the EFHW: 42.135 meters.

It will resonate on all harmonics: 7.100, 14.200, 28.400

Pair harmonics:

  • 2, 4, 6, 8

Impair harmonics:

  • 3, 5, 7, 9

To calculate frequencies just multiplicate the original frequency by the harmonic number.

Hardware

uSDX tips

Power usage

Around ~500mA in TX. Works with 3S 18650, power output dependent of battery voltage, makes around 4 to 5W in WSPR with 11.8V.

With 3S 18650, unknown capacity, WSPR 40% TX ratio runs for around 3h.

CAT mode

Only available with OLED IO Board.

Firmware needs the following:

#define CAT              1   // CAT-interface

NOT TESTED yet:

//#define CAT_EXT        1   // Extended CAT support: remote button and screen control commands over CAT
//#define CAT_STREAMING  1   // Extended CAT support: audio streaming over CAT, once enabled and triggered with CAT cmd, samplerate 7812Hz, 8-bit unsigned audio is sent over UART. The ";" is omited in the data-stream, and only sent to indicate the beginning and end of a CAT cmd.

Connection

  • GND/RX/TX to an USB FTDI
  • Audio OUT (mono) to USB sound card
  • Mic/Key to USB sound card: T(ip)=Key, R(ing)=Mic, S(leeve)=GND, so connect Ring and Sleeve to the soundcard
  • PTT is handled by CAT, nothing specific here

Generic settings

  • TS-480
  • 38400 bps
  • 8n1
  • NO Handshake, so NO RTS and DTR (force them low if possible)
  • Polling 200ms
  • Timeout 4000ms

FLRIG

  • TS-480HX
  • same generic settings
  • Uncheck RTS/CTS
  • In PTT-Generic check PTT via CAT

JS8

  • Not using flrig, directly controlling the CAT interface
  • RIG: Kenwood TS-480
  • Same generic settings
  • PTT Method: CAT
  • Mode: Data/Pkt
  • Split operation: none

WSJT-X

  • Rig: FLRig FLRig
  • Network server: 127.0.0.1:12345
  • PTT Method: CAT
  • Mode: None (any other mode will let the PTT stuck in transmit)
  • Split operation: None

Lab/Ham Equipment

References

Directional Couplers

  • LPC501 Directional Coupler

Attenuators

DC Blocks

Frequency Counter

Spectrum Analyzer

Notes

spectrum analyzer input <> DC Block <> SMA to BNC <> DUT
spectrum analyzer input <> DC Block <> DUT

Connect TX to Spectrum Analyzer

TX <in[directional coupler]out><in[dummy load xxW]testing port> <10db attenuator> spectrum analyzer
               __________
                         |
                         |
                         - ?

Max Power: take max input of spectrum analyzer, let's say +20dBm

You can calculate the max power in dBm:

100W = 50dBm
 30W = 44dBm

\[ dBm = 10\times\log_{10}\left(\frac{30W}{0.001W (1mW)}\right) = 44.77dBm \]

Since they are too high related to the +20dBm max input, you can put the required attenuators to get down to 0dBm.

  • 50dBm = -40dB + -10dB, or -50dB
  • 44dBm = -40dB + 4dB
TX 50dBm <> dummy load -40dB <> -10dB <> 0dBm spectrum analyzer

Max Voltage, let's say, maximum 5V in:

30W in volts formula: \[ V = \sqrt{30W \times 50\Omega} = 38.7V \]

The equivalent dBm for the 5V max input of the instrument: \[ dBm = 20\times\log_{10}\left(\frac{5V}{0.224V (224mV = 0dBm)}\right) = 26.9dBm \]

Using 27dB attenuation will do the job.

Refs

  • LPC501 Directional Coupler
  • Dummy Load with "testing port"/tap/monitor (-40dB)
  • See references for attenuators, directional couplers, etc.
  • dBm units

Dummy Load

10MHz Reference

Note: AUX Ref In is Square Wave, not sine !

  • Leo Bodnar GPSDO, ~99£, square wave, programmable, 1 output
  • GPSDO, ~120€, square wave, 1 output
  • Distribution Amplifier, ~65€, square wave, 8 outputs
  • Cheapest way: NEO-x gps module with PPS output, programming the PPS to 10MHz is possible

Galvanometers frontplate symbols

Measurement type

symbolmeaning
b1Direct current circuit and/or d.c. responding measuring element
b2Alternating current circuit and/or a.c. responding measuring element
b3Direct and/or alternating current circuit and/or d.c.and a.c. responding measuring element
b4Three-phase alternating current circuit (general symbol)
b6One measuring element (E) for three-wire network
b7One measuring element (E) for four-wire network
b8Two measuring elements (E) for three-wire network with unbalanced loads
b9Two measuring elements (E) for four-wire network with unbalanced loads
b10Three measuring elements (E) for four-wire network with unbalanced loads

Safety

symbolmeaning
c1Earth (ground) terminal
c2Protective conductor terminal
c3Frame or chassis terminal
c4Equipotentiality
c5On (Power)
c6Off (Power)
c7Equipment protected throughout by double insulation or reinforced insulation
c8Caution, possibility of electric shock
c9Caution, hot surface
c10In position of a bi-stable push control
c11Out position of a bi-stable push control

Position of use

symbolmeaning
d1Instrument to be used with the dial vertical
d2Instrument to be used with the dial horizontal
d3Instrument to be used with the dial inclined (e.g. 60°) from the horizontal plane
d4Example for instrument to be used as D-1, nominal range of use from 80° to 100°
d5Example for instrument to be used as D-2, nominal range of use from –1° to +1°
d6Example for instrument to be used as D-3, nominal range of use from 45° to 75°

Accuracy class

symbolmeaning
e1Class index (e.g. 1) except when the fiducial value corresponds to the scale length or the indicated value or the span
e2Class index (e.g. 1) when the fiducial value corresponds to the scale length
e3Class index (e.g. 1) when the fiducial value corresponds to the indicated value
e10Class index (e.g. 1) when the fiducial value corresponds to the span

General symbols

symbolmeaning
f1Permanent-magnet moving-coil instrument
f2Permanent-magnet ratiometer (quotientmeter)
f3Moving permanent-magnet instrument
f4Moving permanent-magnet ratiometer (quotientmeter)
f5Moving-iron instrument
f6Polarized moving-iron instrument
f7Moving-iron ratiometer (quotientmeter)
f8Ironless electrodynamic instrument
f9Iron-cored electrodynamic (ferro-dynamic) instrument
f10Ironless electro-dynamic ratiometer (quotientmeter)
f11Iron-cored electro-dynamic (ferro-dynamic) ratiometer (quotientmeter)
f12Induction instrument
f13Induction ratiometer (quotientmeter)
f15Bimetallic instrument
f16Electrostatic instrument
f17Vibrating-reed instrument
f18Non-insulated thermocouple (thermal converter)
f19Insulated thermocouple (thermal converter)
f20Electronic device in a measuring circuit
f21Electronic device in an auxiliary circuit
f22Rectifier
f23Shunt
f24Series resistor
f25Series inductor
f26Series impedance
f27Electric screen
f28Magnetic screen
f29Astatic instrument
f30Magnetic field strength expressed in kiloamperes per metre, producing a variation corresponding to the class index (e.g. 2 kA/m)
f32Zero (span) adjuster
f33Refer to a separate document
f34Electric field strength expressed in kilovolts per metre, producing a variation corresponding to the class index (e.g. 10 kV/m)
f35General accessory
f37Ferrous support of thickness X mm
f38Ferrous support of any thickness
f39Non-ferrous support of any thickness
f44Noiseless earth (ground) terminal
f45Signal low terminal
f46Positive terminal
f47Negative terminal
f48Resistance range setting control
f50Overload protection device fitted
f50Overload protection device reset control

Groups of environmental conditions

symbolmeaning
g1Instrument used in laboratory
g2Instrument used outdoor or under conditions that the ambient temperature changes badly

Testing voltage

symbolmeaning
t1Tested voltage, up to 500V
t2Tested voltage, up to 2kV
t0No test

Examples

galva1

From left to right:

  • Direct and/or alternating current circuit and/or d.c.and a.c. responding measuring element
  • Tested up to 2kV
  • unknown
  • Instrument to be used with the dial vertical
  • Moving-iron instrument

Blender

Various tips

Better sphere

  • Add a cube
  • Add Subdivision modifier (levels viewport: 3, render: 3, optimal display: unchecked)
  • Add Cast modifier (factor: 1.43)
  • Apply them
  • Subdivide and smooth as wanted

Auto smooth whatever

  • Green triangle
  • Normals
    • Auto smooth (checked, 30°)

Pipe thickness

  • Use a Solidify modifier

Tips MySQL

Export all users and rights

mysql -e"select concat('show grants for ','\'',user,'\'@\'',host,'\'') from mysql.user" > user_list_with_header.txt

sed '1d' user_list_with_header.txt > ./user.txt

while read user; do  mysql -e"$user" > user_grant.txt; sed '1d' user_grant.txt >> user_privileges.txt; echo "flush privileges" >> user_privileges.txt; done < user.txt

awk '{print $0";"}'  user_privileges.txt >user_privileges_final.sql

rm user.txt user_list_with_header.txt user_grant.txt user_privileges.txt

Source: https://stackoverflow.com/a/30751822/465146

MySQL

UTF-8

Config

[client]
default-character-set=utf8

[mysql]
default-character-set=utf8


[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8

Switch all to UTF-8

DB="database_name"; ( echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_unicode_ci;' ; mysql "$DB" -e "SHOW TABLES" --batch --skip-column-names | xargs -I{} echo 'ALTER TABLE `'{}'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;' ) | mysql "$DB"

Check

SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME     FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='xxx';

Scripting tips

  • set -e: stop on errors
  • set -u: stop on unset $VARS
  • set -o pipefail: stop on | fail

Mkgmap howto

See https://openmtbmap.org/about-2/archive/render-maps-mkgmap/

Software requirements

You will need java !

Uses the Required tools & OpenTopoMap repository script/commands to get the latest mkgmap, splitter and bounds files.

Git checkout https://github.com/der-stefan/OpenTopoMap/, it will be used for the styles.

Map datas

Go to http://download.geofabrik.de/ and download the part you want, in .osm.bz2 format.

Splitting the map

java -Xmx1000m -ea -jar ..\splitter-r602\splitter.jar --max-nodes=600000 --overlap=4000 --max-areas=255 --description="zone-bonnieres" --mapid="12340000" --max-nodes="600000" --no-trim --overlap="4000" --status-freq="600" zone-bonnieres.osm

Compile the map

java -ea -Xmx1000M -jar ..\mkgmap-r4767\mkgmap.jar --style-file=G:\garmin\opentopomap-garmin\style\opentopomap --max-jobs --generate-sea=polygons,extend-sea-sectors,close-gaps=6000 --reduce-point-density=5.4 --x-reduce-point-density-polygon=5.4 --index --transparent --adjust-turn-headings --ignore-maxspeeds --ignore-turn-restrictions --remove-short-arcs=4 --description=zone_bonnieres --location-autofill=1 --route --country-abbr=fr --country-name=france --mapname=12340000 --family-id=1234 --product-id=1 --series-name="bonnieres_fr_%date%" --family-name="bonnieres_fr_%date%" --overview-mapname=mapset --area-name="Bonnieres_%date%_custom" -c template.args --gmapsupp

Zone bonnieres:

osmosis  --read-xml enableDateParsing=no file=france-latest.osm --bounding-box top=49.06751 left=24.649 bottom=55.468 right=48.925 --write-xml file=zone-bonnieres.osm

https://www.openstreetmap.org/export#map=11/49.0509/1.5992 coords gps

SSL

Extracting private and public keys from a p12 file

Private key:

openssl pkcs12 -in file_name.p12 -nocerts -out private.key

with pass warning !!!

Certificates

openssl pkcs12 -in file_name.p12 -clcerts -nokeys -out public.crt

Ca certificates:

openssl pkcs12 -in file_name.p12 -cacerts -nokeys -out ca.crt

Generate a bundle:

openssl pkcs12 -in file_name.p12 -out cert.pem -nodes

then just use the parts wanted

Generate certificates bundle file

openssl pkcs12 -nokeys -in server-cert-key-bundle.p12 -out server-ca-cert-bundle.pem

Generate server key file

openssl pkcs12 -nocerts -nodes -in server-cert-key-bundle.p12 -out server.key

Some notes for ZOL on ROOT

Disk replacement

In case of hdd replacement needed, valid only for this install method: https://github.com/terem42/zfs-hetzner-vm

First get the disk out of the pools:

zpool detach bpool ata-HGST_HUS726020ALE610_K5HRNGMA-part2
zpool detach rpool ata-HGST_HUS726020ALE610_K5HRNGMA-part3

At this point, provider will replace the HDD and boot into rescue.

Then recreate the partitions on the new disk:

selected_disk=/dev/sda
wipefs --all --force "$selected_disk"
sgdisk -a1 -n1:24K:+1000K            -t1:EF02 "$selected_disk"
sgdisk -n2:0:+2G                   -t2:BF01 "$selected_disk" # Boot pool
sgdisk -n3:0:"$tail_space_parameter" -t3:BF01 "$selected_disk" # Root pool

Install ZFS on rescue:

echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections
apt-get install --yes software-properties-common
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659
add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main'
apt update
apt install --yes zfs-dkms zfsutils-linux
add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main'
apt update
find /usr/local/sbin/ -type l -exec rm {} +
zfs --version

Import pools (can take a while):

zpool import -f -R /mnt rpool
zpool import -f -R /mnt bpool

Pools status:

zpool status

Reintegrate the disks to the pools in mirror, XX_XXX_XXX being the new disk:

zpool attach bpool ata-EXISTING_DISK_WITHDATAS-part2 ata-XXX_XXX_XXX-part2
zpool attach rpool ata-EXISTING_DISK_WITHDATAS-part3 ata-XXX_XXX_XXX-part3

Reinstall grub:

zfs mount rpool/ROOT/ubuntu
mount -t zfs bpool/BOOT/ubuntu /mnt/boot
for virtual_fs_dir in proc sys dev; do
  mount --rbind "/$virtual_fs_dir" "/mnt/$virtual_fs_dir"
done
chroot /mnt/
# in chroot:
grub-install /dev/sda
grub-install /dev/sdb
update-grub
exit

Export pools:

# unmount virtual fs dirs
for virtual_fs_dir in dev sys proc; do
    umount --recursive --force --lazy "/mnt/$virtual_fs_dir"
done
# umount boot and root
umount /mnt/boot
umount /mnt
# export pools (can take some time)
zpool export bpool
zpool export rpool
zpool export nvme
zpool export -a
# just be sure they are all exported, order might matter

After reboot, and server rebooted correctly:

Probably now wait until pools are resilvered:

zpool status

backuppc notes

Transfert whole datas to another server or disk

cd /var/lib/backuppc
tar cpf - . | ssh xxxx 'tar xpv -C /var/lib/backuppc'
cd /var/lib/backuppc_old
tar cpf - . | tar xpv -C /var/lib/backuppc

backuppc on zfs-on-linux

forget it, absolute performance mess

the workaround is to use a zVOL and format it in ext4:

zfs create -s -V 600g rpool/datas/backuppc_zvol
mkfs.ext4 /dev/zvol/rpool/datas/backuppc_zvol
tune2fs -m0 /dev/zvol/rpool/datas/backuppc_zvol
# /etc/fstab
/dev/zvol/rpool/datas/backuppc_zvol     /datas/backuppc    ext4    rw,noatime 0 0

Some notes for LVM

Unfuck it after second disk gone in restore case

We had a database server, we needed restore from a few days ago.

The LVM had two pv disks, one with snapshots enabled, one without.

We needed to restore /home/exports corresponding to vg_datas-lv_mysql_exports.

This will work because, by luck, /dev/sdb was snapshotted, and /dev/sdc wasn't, AND specially because the lv_mysql_exports LV was on the /dev/sdb disk.

As shown in this snippet from the live server:

[uwu@source-server:~]$ sudo lsblk
NAME                              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                                 8:0    0    20G  0 disk
├─sda1                              8:1    0   200M  0 part /boot/efi
└─sda2                              8:2    0  19.8G  0 part /
sdb                                 8:16   0   1.2T  0 disk
├─vg_datas-lv_mysql_data          253:0    0 919.7G  0 lvm  /var/lib/mysql/data
├─vg_datas-lv_mysql_binlogs       253:1    0   309G  0 lvm  /var/lib/mysql/binlogs
├─vg_datas-lv_mysql_exports       253:2    0   140G  0 lvm  /home/exports
└─vg_datas-lv_xxx                 253:3    0    10G  0 lvm  /home/applis/xxx
sdc                                 8:32   0   300G  0 disk
├─vg_datas-lv_mysql_data          253:0    0 919.7G  0 lvm  /var/lib/mysql/data
└─vg_datas-lv_xxx                 253:4    0    50G  0 lvm  /var/lib/xxx

We created a new VM, with disks from the available snapshots, and got:

[root@srv-restore ~]# pvs
  WARNING: Device for PV d59f9dc7-3b1b-43a4-a0d1-96a230b324cb not found or rejected by a filter.
  Couldn't find device with uuid d59f9dc7-3b1b-43a4-a0d1-96a230b324cb.
  PV         VG       Fmt  Attr PSize    PFree
  /dev/sdb   vg_datas lvm2 a--     1.19t      0
  [unknown]  vg_datas lvm2 a-m  <300.00g <91.34g

A bit annoying, as we can't get any lv mounted or shown at all.

We are going to fake a disk with the wanted UUID, only to makes LVM happy and get what we want.

Export the UUID from the pvs command:

export UUID="d59f9dc7-3b1b-43a4-a0d1-96a230b324cb"

Create a 100M disk-file:

dd if=/dev/zero of=/tmp/tmp.raw bs=1M count=100

Some losetup magic to map the file to a block device:

losetup -f
losetup /dev/loop0 /tmp/tmp.raw

Create a PV from this "disk":

pvcreate --norestorefile -u $UUID /dev/loop0

And now, LVM is happy !

[root@srv-restore ~]# pvs
  WARNING: Device /dev/loop0 has size of 204800 sectors which is smaller than corresponding PV size of 629145600 sectors. Was device resized?
  One or more devices used as PVs in VG vg_datas have changed sizes.
  PV         VG       Fmt  Attr PSize    PFree
  /dev/loop0 vg_datas lvm2 a--  <300.00g <91.34g
  /dev/sdb   vg_datas lvm2 a--     1.19t      0
[root@srv-restore ~]# lvs
  WARNING: Device /dev/loop0 has size of 204800 sectors which is smaller than corresponding PV size of 629145600 sectors. Was device resized?
  One or more devices used as PVs in VG vg_datas have changed sizes.
  LV                     VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_xxx                 vg_datas -wi-------  50.00g
  lv_mysql_binlogs       vg_datas -wi------- 309.00g
  lv_mysql_data          vg_datas -wi------- 919.65g
  lv_mysql_exports       vg_datas -wi-a----- 140.00g
  lv_xxx                 vg_datas -wi-------  10.00g

We might had needed to do a vgchange -ay or something to get the vg and lvs to shows, but in the end, we were able to ignore the warning, and mount /dev/vg_datas/lv_mysql_exports without issues.

And since srv-restore was temporary, we nuked everything.

If that was on a non-temporary server, you would need to properly remove the LV/VG/PVs, disable losetup with losetup -D, and remove /tmp/tmp.raw.

Networking shit

NMCLI bridge

nmcli con show
nmcli con add ifname brvm0 type bridge con-name brvm0
nmcli con modify brvm0 ipv4.method manual ipv4.address "10.0.0.8/24"
nmcli con modify brvm0 bridge.stp no
nmcli -f bridge con show brvm0
nmcli con up brvm0

Netplan bridge

network:
  version: 2
  ethernets:
    eno1:
      dhcp4: false
    eno2:
      dhcp4: true
  bridges:
    virbr1:
      macaddress: "fa:rt:fa:rt:fa:rt"
      dhcp4: true
      interfaces: [eno1]
      parameters:
        stp: false
        forward-delay: 0
network:
  version: 2
  ethernets:
    eno1:
      dhcp4: false
    eno2:
      dhcp4: true
  bridges:
    virbr1:
      macaddress: "fa:rt:fa:rt:fa:rt"
      dhcp4: true
      interfaces: [eno1]
      parameters:
        stp: false
        forward-delay: 0
    brvm0:
      dhcp4: false
      addresses: [10.0.0.10/24]
      parameters:
        stp: false

Netplan VLAN

network:
  version: 2
  vlans:
    vlan4000:
      id: 4000
      link: enp4s0
      addresses: ['192.168.100.3/24']

Netplan Bridge hetzner

### Hetzner Online GmbH installimage
network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      dhcp4: no
      dhcp6: no
  bridges:
    brpub0:
      macaddress: fa:rt:fa:rt:fa:rt
      dhcp4: no
      dhcp6: no
      parameters:
        forward-delay: 1
        stp: false
      interfaces:
        - enp2s0
      addresses:
        - 1.2.3.4/32
        - 1:2:3:4::2/64
      routes:
        - on-link: true
          to: 0.0.0.0/0
          via: 1.2.3.4
      gateway6: fe80::1
      nameservers:
        addresses:
          - 8.8.8.8