『壹』 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鏈嶅姟鍣