[email protected]:~# netwox 171
執行命令後將完成獲取 IP 地址的整個過程,並輸出每個過程相關的資訊。為了方便講解,下面將資訊進行拆分,然後分別講解。I send a DISCOVER: DHCP____________________________________________________________. | op=request hops=0 xid=B8ED8552 secs=0 flags=0000 | | client=0.0.0.0 your=0.0.0.0 | | server=0.0.0.0 agent=0.0.0.0 | | clienteth=00:0C:29:FD:DE:B8 | | sname: | | file: | | msgtype: discover | | clientidtype: 1 | | clientid: 000c29fddeb8 | | reqlist[0]: 1 (subnetmask) | #下面為用戶端要請求的列表資訊 | reqlist[1]: 3 (gateways) | | reqlist[2]: 4 (timeservers) | | reqlist[3]: 5 (nameservers) | | reqlist[4]: 6 (dnsservers) | | reqlist[5]: 7 (logservers) | | reqlist[6]: 9 (lprservers) | | reqlist[7]: 12 (hostname) | | reqlist[8]: 15 (domainname) | | reqlist[9]: 28 (broadcastad) | | reqlist[10]: 31 (performroutdisc) | | reqlist[11]: 33 (staticroutes) | | reqlist[12]: 40 (nisdomain) | | reqlist[13]: 41 (nisservers) | | reqlist[14]: 51 (ipadleasetime) | | reqlist[15]: 58 (renewaltime) | | reqlist[16]: 59 (rebindingtime) | | reqlist[17]: 64 (nispdomain) | | reqlist[18]: 65 (nispserver) | | reqlist[19]: 69 (smtpservers) | | reqlist[20]: 70 (pop3servers) | | reqlist[21]: 71 (nntpservers) | | reqlist[22]: 72 (wwwservers) | | reqlist[23]: 74 (ircservers) | |___________________________________________________________ |以上輸出資訊中,第 1 行表示用戶端傳送了一個 Discover 包,用來向伺服器請求租用的 IP 地址。
Server sent us this OFFER: DHCP____________________________________________________________. | op=reply hops=0 xid=B8ED8552 secs=0 flags=0000 | | client=0.0.0.0 your=192.168.59.131 | | server=192.168.59.254 agent=0.0.0.0 | | clienteth=00:0C:29:FD:DE:B8 | | sname: | | file: | | msgtype: offer | | serverid: 192.168.59.254 | | ipadleasetime: 1800 | | subnetmask: 255.255.255.0 | #子網掩碼 | gateways[0]: 192.168.59.2 | #閘道器 | dnsservers[0]: 192.168.59.2 | #DNS伺服器地址 | domainname: 'localdomain' | #域名 | broadcastad: 192.168.59.255 | #廣播地址 | renewaltime: 900 | #更新時間 | rebindingtime: 1575 | #重新連線時間 | end | |_____________________________________________________ | Server 192.168.59.254(00:50:56:ED:87:BC) proposes address 192.168.59.131以上輸出資訊中,第 1 行表示伺服器向用戶端返回了提供 IP 地址租約的封包。
I accept previous OFFER: DHCP____________________________________________________________. | op=request hops=0 xid=B8ED8552 secs=0 flags=0000 | | client=0.0.0.0 your=0.0.0.0 | | server=0.0.0.0 agent=0.0.0.0 | | clienteth=00:0C:29:FD:DE:B8 | | sname: | | file: | | msgtype: request | | clientidtype: 1 | | clientid: 000c29fddeb8 | | requestedipad: 192.168.59.131 | #選擇請求的IP地址 | serverid: 192.168.59.254 | #伺服器IP地址 | reqlist[0]: 1 (subnetmask) | #下面為請求的其他資訊 | reqlist[1]: 3 (gateways) | | reqlist[2]: 4 (timeservers) | | reqlist[3]: 5 (nameservers) | | reqlist[4]: 6 (dnsservers) | | reqlist[5]: 7 (logservers) | | reqlist[6]: 9 (lprservers) | | reqlist[7]: 12 (hostname) | | reqlist[8]: 15 (domainname) | | reqlist[9]: 28 (broadcastad) | | reqlist[10]: 31 (performroutdisc) | | reqlist[11]: 33 (staticroutes) | | reqlist[12]: 40 (nisdomain) | | reqlist[13]: 41 (nisservers) | | reqlist[14]: 51 (ipadleasetime) | | reqlist[15]: 58 (renewaltime) | | reqlist[16]: 59 (rebindingtime) | | reqlist[17]: 64 (nispdomain) | | reqlist[18]: 65 (nispserver) | | reqlist[19]: 69 (smtpservers) | | reqlist[20]: 70 (pop3servers) | | reqlist[21]: 71 (nntpservers) | | reqlist[22]: 72 (wwwservers) | | reqlist[23]: 74 (ircservers) | |_________________________________________________ |以上輸出資訊中,第 1 行表示用戶端接收了伺服器提供的地址租約。
Server sent us this ACK: DHCP____________________________________________________________. | op=reply hops=0 xid=B8ED8552 secs=0 flags=0000 | | client=0.0.0.0 your=192.168.59.131 | | server=192.168.59.254 agent=0.0.0.0 | | clienteth=00:0C:29:FD:DE:B8 | | sname: | | file: | | msgtype: ack | | serverid: 192.168.59.254 | | ipadleasetime: 1800 | | subnetmask: 255.255.255.0 | #用戶端的子網掩碼 | gateways[0]: 192.168.59.2 | #用戶端的閘道器 | dnsservers[0]: 192.168.59.2 | #用戶端的DNS伺服器 | domainname: 'localdomain' | | broadcastad: 192.168.59.255 | | renewaltime: 900 | | rebindingtime: 1575 | | end | |_________________________________________________ | Server 192.168.59.254(00:50:56:ED:87:BC) gave address 192.168.59.131 Press q to quit.以上輸出資訊中,第 1 行表示伺服器確認了用戶端要租約的 IP 地址資訊,用戶端可以使用請求的 IP 地址了。