Jam*_* MV 3 linux ubuntu networking dhclient
我的 ubuntu 机器从 DNS 服务器接收到 7000 秒的更新时间。我想通过 dhclient.conf 在 ubuntu 机器上将其更改为更长。我无法更改 dhcp 服务器。
然而,我尝试的所有示例似乎都不是正确的语法。例如,如果我在 .conf 顶部添加请求租约时间为 6000,则不会有任何变化。我也尝试过
min-lease-time infinite;
max-lease-time infinite;
Run Code Online (Sandbox Code Playgroud)
作为全局变量。
#send host-name "andare.fugue.com";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
send dhcp-lease-time 6000;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
Run Code Online (Sandbox Code Playgroud)
有什么想法,看起来应该很容易做到吗?
TIA
就我而言,解决方案是添加dhclient.conf:
supersede dhcp-lease-time the_value_i_want;
Run Code Online (Sandbox Code Playgroud)
这会覆盖服务器给出的租用时间。
通过这种方式设置过期时间,续订(T1)和重新绑定(T2)时间由客户端计算(大约是租用时间的1/2和7/8)。
| 归档时间: |
|
| 查看次数: |
12922 次 |
| 最近记录: |