First check your current ip and gateway settings with the command “ip a” and “ip r”.
Edit the file /etc/netplan/00-installer-config.yaml, place the following contents in it:

network:
renderer: networkd
ethernets:
eth0:
addresses:
- 172.29.0.2/24
nameservers:
addresses: [1.1.1.1,8.8.8.8]
routes:
- to: default
via: 172.29.0.1
version: 2
The gateway address can be determined by executing ip r
