📄 492.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://apue.dhs.org"><font face="黑体"><big><big>apue</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center"> ● UNIX网络编程 (BM: clown) </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="index.htm">回到开始</a>][<a href="472.htm">上一层</a>][<a href="493.htm">下一篇</a>]
<hr><p align="left"><small>发信人: scircle (yuanyuan), 信区: UNP <br>
标 题: Re: BOOTP的问题 <br>
发信站: UNIX编程 (2001年08月20日18:43:13 星期一), 站内信件 <br>
<br>
看了RFC1541(Dynamic Host Configuration Protocol),4.4.1的 <br>
第四段讲解了为什么sender's ip address is 0.0.0.0 <br>
The client collects DHCPOFFER messages over a period of time, selects <br>
one DHCPOFFER message from the (possibly many) incoming DHCPOFFER <br>
messages (e.g., the first DHCPOFFER message or the DHCPOFFER message <br>
from the previously used server) and extracts the server address from <br>
the 'server identifier' option in the DHCPOFFER message. The time <br>
over which the client collects messages and the mechanism used to <br>
select one DHCPOFFER are implementation dependent. The client may <br>
~~~~~~~~~~~~~~~~~~~~~~~~(1) <br>
perform a check on the suggested address to ensure that the address <br>
is not already in use. For example, if the client is on a network <br>
that supports ARP, the client may issue an ARP request for the <br>
suggested request. When broadcasting an ARP request for the <br>
suggested address, the client must fill in its own hardware address <br>
as the sender's hardware address, and 0 as the sender's IP address, <br>
to avoid confusing ARP caches in other hosts on the same subnet. If <br>
~~~~~~~~~~ (2) <br>
the network address appears to be in use, the client sends a <br>
DHCPDECLINE message to the server and waits for another DHCPOFFER. As <br>
the client does not have a valid network address, the client must <br>
broadcast the DHCPDECLINE message. <br>
我的理解是: <br>
TCP/IP v1 p219开头说client立即发送arp请求,开始的sender's ip <br>
address is 0.0.0.0 .原因见(2) <br>
发送两次,可能是与系统实现相关.见(1) <br>
第三次,sender's ip address is proeus,再发送一次arp请求, <br>
是为了: <br>
The client SHOULD broadcast an ARP reply to announce the <br>
client's new IP address and clear an outdated ARP cache <br>
entries in hosts on the client's subnet. <br>
总之,先发送0.0.0.0的那个arp request,是为了avoid confusing ARP <br>
caches in other hosts on the same subnet(因为此时client并不清楚它 <br>
的ip address是否被别的host占用了).再发送proeus的arp request,此时 <br>
通知相同子网的主机刷新它们的ARP Caches. <br>
【 在 scz (小四) 的大作中提到: 】 <br>
: 这种因为历史原因留下来的实现根本无从考究的。 <br>
: 那里仅仅是举了一个实例,不见得所有涉及BOOTP的都要那样 <br>
: 做。发两次,可能考虑丢包,可能其他什么原因,这些都和BOOTP <br>
: 无关紧要了。实在不放心了,找个现代FreeBSD的相关代码看实现。 <br>
: 免费ARP请求的重要目的在于通知大家刷新自己的ARP CACHE <br>
: 前面两个ARP确认没有其他IP对应这个IP地址,然后发免费ARP <br>
: 固定大家的ARP Cache,我觉得没有什么很奇怪的地方啊。 <br>
: 【 在 scircle (yuanyuan) 的大作中提到: 】 <br>
: : 你说的Q1解释我也知道,它是个gratuitous ARP request(section <br>
: : 4.7).我的意思是为什么还有Line 3和Line4,Lin5不就直接解决问题 <br>
: .................(以下省略) <br>
-- <br>
※ 来源:·UNIX编程 www.tiaozhan.com/unixbbs/·[FROM: 202.108.211.32] <br>
</small><hr>
<p align="center">[<a href="index.htm">回到开始</a>][<a href="472.htm">上一层</a>][<a href="493.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -