Based on this you configuration in .yaml
(sudo /etc/netplan/50-xxxx.yaml) can be:
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
dhcp6: no
addresses: [192.168.0.97/25]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
Or some appropriate netmask
.
Netmask cannot be 255.255.255.1
. Netmask for class C addresses can be:
Prefix size | Subnet mask
/24 | 255.255.255.0
/25 | 255.255.255.128
/26 | 255.255.255.192
/27 | 255.255.255.224
/28 | 255.255.255.240
/29 | 255.255.255.248
/30 | 255.255.255.252
# sudo netplan apply