Ubuntuはカードの名前を変更:ens3 =>はeth0
ステップ1:まず、rootアカウントに切り替え、viのは、/ etc / default / grubの。
ステップ2:パラメータGRUB_CMDLINE_LINUXはnet.ifnames = 0 biosdevname = 0を追加しました。
ステップ3:次に、コマンドの更新-GRUBを実行し、ファイルを保存
ステップ4:編集、保存、ファイル/ etc /ネットワーク/インタフェースと、再起動のubuntu
ステップ5:最後に修正が成功したかどうかを確認
NICの設定ファイル:の/ etc /ネットワーク/インタフェース
の変更:
1.ルート変更へ
2. sudoコマンドの許可
デフォルトのコンフィギュレーション・ファイルの内容:
cheng@ubuntu:~$ sudo cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
変更は、静的アドレスを追加します:
cheng@ubuntu:~$ sudo vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.40.14
gateway 192.168.40.1
netmask 255.255.255.0
ネットワークを再起動します:
cheng@ubuntu:~$ sudo /etc/init.d/networking --help
Usage: /etc/init.d/networking {start|stop|reload|restart|force-reload}
cheng@ubuntu:~$ sudo /etc/init.d/networking restart
[ ok ] Restarting networking (via systemctl): networking.service.
カードのeth1を追加
auto eth1
iface eth1 inet static
address 192.168.40.15
netmask 255.255.255.0
gateway 192.168.40.1