Ubuntu 15.10ネットワークの問題

Ubuntu 15.10ネットワークの問題

私は最近Ubuntu 15.10を使用して仮想マシンを展開しましたが、ネットワークを正しく設定するのに問題があります。注:OSのインストール時にネットワーク設定を要求していないため、IP(DHCPから)を取得してください。インストール後、そのIPを介してサーバーにアクセスできます。しかし、引き続きサーバーに別のIP(10.100.144.115)を追加しようとしていますが、サーバーは受信されません。

これが/etc/network/interfacesにあります:

root@blah20:/etc/network# cat 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 ens33
iface lo inet loopback

# The primary network interface – use DHCP to find our address
auto ens33
iface ens33 inet static
address 10.100.144.142
netmask 255.255.255.0
broadcast 10.100.144.255
gateway 10.100.144.1
dns-nameserver 8.8.8.8

# The secondary IP – This one is very important as it hosts the Portal.
auto ens33
iface ens33:0 inet static
address 10.100.144.115
netmask 255.255.255.0
gateway 10.100.144.1
root@blah20:/etc/network#

ネットワークを再起動すると、最初のIPだけが得られます。

root@blah20:/etc/network# ifconfig
ens33     Link encap:Ethernet  HWaddr 00:50:56:a4:5e:35
          inet addr:10.100.144.142  Bcast:10.100.144.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fea4:5e35/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:482877 errors:2 dropped:2 overruns:0 frame:0
          TX packets:44446 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:108341017 (108.3 MB)  TX bytes:14661830 (14.6 MB)
          Interrupt:19 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1724 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1724 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:170653 (170.6 KB)  TX bytes:170653 (170.6 KB)

root@blah20:/etc/network#

いろいろな方法を試してみましたが、何も動作しないようです。誰かが私が間違っていることを教えてもらえますか? CentOSや他のバージョンでは、このような問題が発生したことはありません。

ベストアンサー1

私の考えの問題は、あなたが持っているということです自動ens33もう一度交換する自動ens33:02番目のセクションでは。現時点では、構成では次のことができます。ifup ens33:0手動で起動します。

おすすめ記事