Centos服务器不断跳转到地址而不是静态分配的地址

Modified on: Thu, 17 Oct 2019 16:00:02 +0800

我有一个无头Centos服务器,我配置了静态IP地址。我已经禁用了网络管理器,avahi-daemon等。每当我重新启动网络时,它只会跳转到10.155.90.100而不是所需的10.155.90.61而没有任何解释:

这是我的ifcfg-eth0:

   # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
    DEVICE=eth0
    BOOTPROTO=static
    ONBOOT=yes
    #HWADDR=00:50:56:b0:5a:57
    IPADDR=10.155.90.61
    NETMASK=255.255.255.0
    GATEWAY=10.155.90.1
    TYPE=Ethernet
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes
    NM_CONTROLLED=no

无论如何它似乎正在运行DHCP。我似乎无法在/ var / log / messges中获得比这更详细的日志:

Jul 11 12:50:33 NET[4767]: /sbin/dhclient-script : updated /etc/resolv.conf
Jul 11 12:50:34 kernel: 8021q: adding VLAN 0 to HW filter on device eth0
Jul 11 12:50:34 kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jul 11 12:50:34 kernel: e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Jul 11 12:50:34 kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jul 11 12:50:36 dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x39edae98)
Jul 11 12:50:36 dhclient: DHCPACK from 10.155.50.20 (xid=0x39edae98)
Jul 11 12:50:36 NET[5157]: /sbin/dhclient-script : updated /etc/resolv.conf
Jul 11 12:50:36 dhclient: bound to 10.155.90.100 -- renewal in 255205 seconds.

如何关闭DHCP并停止服务器跳转错误的IP?

作者:blarg

最佳答案

简单明了的解决方案:卸载你不需要的东西:)

yum remove dhclient 

相关问答

添加新评论