答案1
我想您已将配置文件中的=
符号替换为符号:而不是.尝试将 替换为 a并尝试重新启动网络服务。:
IPADDR:192.168.10.25
IPADDR=192.168.10.25
:
=
示范:
cat /etc/sysconfig/network-scripts/ifcfg-eth1:1
DEVICE=eth1:1
HWADDR=08:00:27:1F:BE:7E
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR:192.168.56.102
ifup eth1:1
/etc/sysconfig/network-scripts/ifcfg-eth1:1: line 7: IPADDR:192.168.56.102: command not found
/etc/sysconfig/network-scripts/ifcfg-eth1:1: line 7: IPADDR:192.168.56.102: command not found
/etc/sysconfig/network-scripts/ifcfg-eth1:1: line 7: IPADDR:192.168.56.102: command not found
/etc/sysconfig/network-scripts/ifcfg-eth1:1: line 7: IPADDR:192.168.56.102: command not found
变成::
=
ifup eth1:1
Determining if ip address 192.168.56.102 is already in use for device eth1...
ifconfig eth1:1
eth1:1 Link encap:Ethernet HWaddr 08:00:27:1F:BE:7E
inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1