Setup DHCP server on the USB 3.0 Ethernet
To auto-assign the IP address to the device that connect to the USB 3.0 Ethernet Type-C port of Pi-Cast you will need to setup a DHCP server on the network interface eth0
.
The Easy Way
The easy way to set up the onboard USB3.0 Ethernet is using the pre-build image. You can download the image on this link.
Then flash the image to your microSD card. Here is the tutorial for flashing the image.
Manual Way
- Log into PiKVM by ssh.
-
make the system writeable.
rw
-
Edit the file
/etc/dnsmasq.conf
with the below content.port=0 interface=eth0 bind-dynamic domain-needed bogus-priv dhcp-range=192.168.2.101,192.168.2.200,12h dhcp-option=3
-
Add the below line to the end of the file
/etc/fstab
.tmpfs /var/lib/misc tmpfs mode=0755 0 0
Note
Because dnsmasq would write the file
/var/lib/misc/dnsmasq.leases
when running. But folder/var/lib/misc
was mounted as read-only on PiKVM system so dnsmasq wouldn't start success. -
Assign static IP to
eth0
. Change the[Network]
section of the file/etc/systemd/network/eth0.network
to the following content.[Network] #DHCP=yes #DNSSEC=no Address=192.168.2.1/24
-
Enable the dnsmasq service at startup by the following command.
systemctl enable dnsmasq
-
Remount the system as read-only and reboot.
ro&reboot&exit
Not write yet
Need to write sometime.
After the Pi-Cast booted, connect your computer to the USB3.0 ethernet port of Pi-Cast. Wait a moment, A new network connection will appear and be assigned an IP address starting with 192.168.2. Now you can use the IP address 192.168.2.1 to access your Pi-Cast for the PiKVM webpage or ssh login.
The following image shows an ethernet connection example on MacOS.