Saya telah mengkonfigurasi beberapa alamat IP pada kotak ubuntu, tetapi ketika saya menjalankannya ifconfig
hanya menunjukkan salah satunya. Namun, saya dapat melakukan ping ke semua alamat yang ditugaskan untuk mesin ini.
/etc/network/interface
isi:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.202.11
netmask 255.255.255.0
network 192.168.202.0
broadcast 192.168.202.255
gateway 192.168.202.1
# dns-* options are implemented by the resolvconf package, if installed
dns-search idil.dz1.da
auto eth0:1
iface eth0:1 inet static
address 192.168.202.12
netmask 255.255.255.0
auto eth0:2
iface eth0:2 inet static
address 192.168.202.13
netmask 255.255.255.0
auto eth0:3
iface eth0:3 inet static
address 192.168.202.14
netmask 255.255.255.0
auto eth0:4
iface eth0:4 inet static
address 192.168.202.15
netmask 255.255.255.0
auto eth0:5
iface eth0:5 inet static
address 192.168.202.16
netmask 255.255.255.0
Namun, output dari ifconfig
hanya:
192.168.202.11
ip addr show
bekerja