‘壹’ dhcp链嶅姟鍣ㄤ娇鐢ㄧ殑浼犺緭灞傚岗璁鏄痶cp杩樻槸udp 鍏 绔鍙e彿鏄澶氩皯
DHCP鍗忚閲囩敤UDP浣滀负浼犺緭鍗忚锛屼富链哄彂阃佽锋眰娑堟伅鍒DHCP链嶅姟鍣镄67鍙风鍙o纴DHCP链嶅姟鍣ㄥ洖搴斿簲绛旀秷鎭缁欎富链虹殑68鍙风鍙c
DHCP浜1993骞10链堟垚涓烘爣鍑嗗岗璁锛屽叾鍓嶈韩鏄叠OOTP鍗忚銆傚畾涔夊彲浠ュ湪RFC 2131涓镓惧埌锛岃屽熀浜嶪Pv6镄勫缓璁镙囧嗳鍙浠ュ湪RFC 3315涓镓惧埌銆侱HCP灏佸寘鍦浼犺緭灞鏄閲囩敤UDP鍗忚锛岃屽綋 Client浼犻佺粰灏佸寘缁 Server镞讹纴閲囩敤镄勬槸UDP 67 Port锛屼粠 Server浼犻佺粰 Client鍒欐槸浣跨敤UDP 68 Port銆
镓╁𪾢璧勬枡锛
dhcp镄勭浉鍏冲伐浣滃师鐞嗭细
1銆佸㈡埛链鸿锋眰ip
瀹㈡埛链哄箍鎾涓涓猟hcp discover鍖咃纴UDP镄67绔鍙o纴婧恑p0.0.0.0 鐩镄刬p255.255.255.255锛堟湁闄愬箍鎾锛夈傝缮鍖呮嫭瀹㈡埛链虹殑MAC鍜屼富链哄悕銆
2銆佹湇锷″櫒鍝嶅簲
链嶅姟鍣ㄥ弹鍒拌锋眰锛屾镆ip鍦板潃姹狅纴濡傛灉链塱p锛屽箍鎾涓涓猟hcp offer鍖咃纴UDP镄68绔鍙o纴婧恑p涓烘湇锷″櫒镄刬p锛岀洰镄刬p涓255.255.255.255 锛岃缮鍖呮嫭濡备笅淇℃伅锛氩㈡埛绔镄凪AC锛屾湇锷″櫒鎻愪緵镄刬p锛瀛愮绣鎺╃爜锛岀熺害锛屾湇锷″櫒镄刬p銆
3銆佸㈡埛链洪夋嫨
浣跨敤鏀跺埌镄勭涓涓猟hcp offer鍖咃纴骞跺彂阃乨hcp request鍖呭箍鎾锛屼娇鐢║DP镄67绔鍙o纴婧恑p0.0.0.0鐩镄刬p 255.255.255.255銆
4銆佹湇锷″櫒纭璁
dhcp链嶅姟鍣ㄥ弹鍒癫hcp request鍖呭悗锛屼细浠dhcp ACK鍖呭悜瀹㈡埛绔骞挎挱锛岀‘璁ゆ垚锷熴备娇鐢║DP镄68绔鍙o纴婧恑p涓烘湇锷″櫒镄刬p锛岀洰镄刬p涓255.255.255.255锛屽㈡埛绔鏀跺埌dhcp ACK鍖呭悗锛屽嵆鍙浣跨敤ip鍦板潃銆
鍙傝冭祫鏂欐潵婧愶细锏惧害锏剧-DHCP
鍙傝冭祫鏂欐潵婧愶细锏惧害锏剧-DHCP链嶅姟鍣