우분투 상자에 여러 개의 IP 주소를 구성했지만 실행할 때 그 ifconfig
중 하나만 표시합니다. 그러나이 컴퓨터에 할당 된 다른 모든 주소를 핑 (ping) 할 수 있습니다.
/etc/network/interface
내용:
# 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
그러나의 출력은 다음 ifconfig
과 같습니다.
192.168.202.11
ip addr show
작품