ネットワーク設定

(16)

----NetworkManagerを使う場合
nmtui


----NetworkManagerを使わない場合

systemctl stop NetworkManager
systemctl disable NetworkManager


vi /etc/network/interfaces

auto lo
iface lo inet loopback

auto ens33
iface ens33 inet static
address 10.10.10.135
netmask 255.255.255.0
gateway 10.10.10.137
dns-nameservers 8.8.8.8

systemctl restart networking

--エラーとなる場合は再起動
reboot

(18)
https://qiita.com/zen3/items/757f96cbe522a9ad397d

vi /etc/netplan/50-cloud-init.yaml

network:
version: 2
renderer: networkd
ethernets:
ens33:
dhcp4: no
dhcp6: no
addresses: [10.10.10.130/24]
gateway4: 10.10.10.137
nameservers:
addresses: [8.8.8.8]

netplan apply

(9)

----NetworkManagerを使う場合
nmtui


----NetworkManagerを使わない場合

systemctl stop NetworkManager
systemctl disable NetworkManager


vi /etc/network/interfaces

auto lo
iface lo inet loopback

auto ens33
iface ens33 inet static
address 10.10.10.136
netmask 255.255.255.0
gateway 10.10.10.137
dns-nameservers 8.8.8.8

systemctl restart networking

--エラーとなる場合は再起動
reboot

 

--リゾルバ用パッケージインストール
vi /etc/resolv.conf
nameserver 8.8.8.8

apt-get install resolvconf
systemctl restart networking

(7)

nmtui

(2012R2)
netsh interface ip show
netsh interface ip show config