static dnsの設定
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved
vi /etc/NetworkManager/NetworkManager.conf
[main]
dns=default
rm /etc/resolv.conf
static ipの設定
nmcli connection show
sudo nmcli con add type ethernet con-name ‘static-ip’ ifname enp1s0 ipv4.method manual ipv4.addresses 192.168.1.17/24 gw4 192.168.1.1
sudo nmcli con mod static-ip ipv4.dns "192.168.1.17 8.8.8.8"
sudo nmcli con up id ‘static-ip’
reboot
新しいipに接続する
コメント