Netplan IP на Ubuntu 18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
sudo nano /etc/netplan/02-networkd.yaml network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no dhcp-identifier: mac macaddress: 00:00:00:00:00:01 addresses: [ 192.168.1.10/24 ] gateway4: 192.168.1.1 nameservers: addresses: [192.168.1.2,192.168.1.3] search: [rc.local] |
1 2 3 4 5 6 7 8 9 |
sudo nano /etc/netplan/50-cloud-init.yaml # network: {config: disabled} network: version: 2 ethernets: eth0: dhcp4: true dhcp-identifier: mac macaddress: 00:00:00:00:00:02 |
1 2 |
sudo netplan generate sudo netplan apply |
Если не работает DNS
1 |
sudo rm -f /etc/resolv.conf && sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf |
Рассказать: