I am playing debian5in Power PC today. I don't know what's going on, but I can't modify the IP address of eth0 by modifying the interface file under/etc/network. The entire operation is as follows:
[root@KAV network]# lsif-down.d/ if-post-down.d/ if-pre-up.d/ if-up.d/ interfaces interfaces.bak[root@KAV network]# cat interfaces# Configure Loopbackauto loiface lo inet loopbackauto eth0iface eth0 inet staticaddress 172.20.51.115 netmask 255.255.0.0auto eth1iface eth1 inet staticaddress 192.168.2.100netmask 255.255.255.0auto eth2iface eth2 inet staticaddress 192.168.3.100netmask 255.255.255.0auto eth3iface eth3 inet staticaddress 192.168.4.100netmask 255.255.255.0[root@KAV network]# ifdown eth0[root@KAV network]# ifup eth0ip: either "local" is duplicate, or "/16" is garbage[root@KAV network]#
Solution:
1. Delete the configuration item eth0 at the beginning of the interface file.
2. Add the eth0 configuration at the end of the interface file. The format is as follows:
[root@KAV network]# cat interfaces# Configure Loopbackauto loiface lo inet loopbackauto eth1iface eth1 inet staticaddress 192.168.2.100netmask 255.255.255.0auto eth2iface eth2 inet staticaddress 192.168.3.100netmask 255.255.255.0auto eth3iface eth3 inet staticaddress 192.168.4.100netmask 255.255.255.0auto eth0iface eth0 inet staticaddress 172.20.51.115 netmask 255.255.0.0
3. Run the following command:
[root@KAV network]# ifdown eth0[root@KAV network]# ifup eth0[root@KAV network]#
Although I do not know why, the IP address is successfully modified. Remember this first!