我使用備用 IP 號(xxx3)運行 Ubuntu 14.04 到 16.04 伺服器升級。升級完成後,我將 /etc/network/interfaces 更改回正確的數字(xxx9 見下文)。
現在顯示舊號碼,顯示兩個號碼,並且實際上可以透過兩個號碼聯絡系統!
我真的很想知道發生了什麼事以及如何擺脫舊的 ip 號碼。
root@fast:~# ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:fc:e6:d0
inet addr:xxx.xxx.xxx.3 Bcast:xxx.xxx.xxx.255 Mask:255.255.255.0
inet6 addr: blah Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:77037 errors:0 dropped:6525 overruns:0 frame:0
TX packets:12999 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7384634 (7.3 MB) TX bytes:10674567 (10.6 MB)
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:328 errors:0 dropped:0 overruns:0 frame:0
TX packets:328 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:38225 (38.2 KB) TX bytes:38225 (38.2 KB)
root@fast:~# ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:fc:e6:d0 brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.xxx.3/24 brd xxx.xxx.xxx.255 scope global eth0
valid_lft forever preferred_lft forever
inet xxx.xxx.xxx.9/24 brd xxx.xxx.xxx.255 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 blah scope link
valid_lft forever preferred_lft forever
root@fast:~# 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).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.9
netmask 255.255.255.0
gateway xxx.xxx.xxx.254
mtu 1492