linux静态ip被占用,linux – 为什么dhclient不会使用我告诉它请求的静态IP?

在尝试通过dhclient获取静态IP192.168.1.222时,遇到了与现有PID文件冲突的问题。DHCP客户端显示已分配了192.168.1.27的地址。尽管确认dhclient读取了配置文件,但固定地址设置未生效。strace验证了配置文件的读取,但DHCP请求仍为192.168.1.27而非预期的192.168.1.222。
摘要由CSDN通过智能技术生成

这是我的/etc/dhcp3/dhclient.conf:

request subnet-mask, broadcast-address, time-offset, routers,

domain-name, domain-name-servers, domain-search, host-name,

netbios-name-servers, netbios-scope, interface-mtu;

timeout 60;

alias {

interface "eth0";

fixed-address 192.168.1.222;

}

lease {

interface "eth0";

fixed-address 192.168.1.222;

option subnet-mask 255.255.255.0;

option broadcast-address 255.255.255.255;

option routers 192.168.1.254;

option domain-name-servers 192.168.1.254;

}

当我运行“dhclient eth0”时,我得到了这个:

There is already a pid file /var/run/dhclient.pid with pid 6511

killed old client process, removed PID file

Internet Systems Consortium DHCP Client V3.1.1

Copyright 2004-2008 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801

wmaster0: unknown hardware address type 801

Listening on LPF/eth0/00:1c:25:97:82:20

Sending on LPF/eth0/00:1c:25:97:82:20

Sending on Socket/fallback

DHCPREQUEST of 192.168.1.27 on eth0 to 255.255.255.255 port 67

DHCPACK of 192.168.1.27 from 192.168.1.254

bound to 192.168.1.27 -- renewal in 1468 seconds.

我使用strace确保dhclient确实正在读取conf文件.为什么不注意我的“固定地址192.168.1.222”线?为什么它会为192.168.1.27执行DHCPREQUEST?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值