DNS服务器和FTP服务器,在对外提供服务时,使用TCP端口还是UDP端口? DNS是使用TCP还是UDP协议?
ftp\u5ba2\u6237\u548c\u670d\u52a1\u5668\u95f4\u4f20\u9012ftp\u547d\u4ee4\u65f6\uff0c\u4f7f\u7528\u7684\u8fde\u63a5\u662ftcp\u8fd8\u662fudpftp\u5ba2\u6237\u548c\u670d\u52a1\u5668\u95f4\u4f20\u9012ftp\u547d\u4ee4\u65f6\uff0c\u4f7f\u7528\u7684\u8fde\u63a5\u662ftcp\u3002
FTP\u534f\u8bae\u662f\u57fa\u4e8e\u4f20\u8f93\u5c42TCP\u534f\u8bae\u7684\u3002FTP\u7684\u63a7\u5236\u8fde\u63a5\u4f7f\u7528\u7aef\u53e321\uff0c\u7528\u6765\u4f20\u8f93\u63a7\u5236\u4fe1\u606f(\u5982\u8fde\u63a5\u8bf7\u6c42\u3001\u4f20\u9001\u8bf7\u6c42\u7b49)\uff0c\u6570\u636e\u8fde\u63a5\u4f7f\u7528\u7aef\u53e320\uff0c\u7528\u6765\u4f20\u8f93\u6570\u636e\u3002
\u63a7\u5236\u8fde\u63a5\u7684\u7279\u70b9\u662f\uff1a
1\u3001\u4ee5\u5ba2\u6237\u4e00\u670d\u52a1\u5668\u65b9\u5f0f\u5efa\u7acb\u3002
2\u3001\u670d\u52a1\u5668\u4ee5\u88ab\u52a8\u65b9\u5f0f\u6253\u5f00\u7528\u4e8eFTP\u7684\u7aef\u53e321\uff0c\u7b49\u5f85\u5ba2\u6237\u7684\u8fde\u63a5\u3002
3\u3001\u5ba2\u6237\u5219\u4ee5\u4e3b\u52a8\u65b9\u5f0f\u6253\u5f00TCP\u7aef\u53e321\uff0c\u6765\u5efa\u7acb\u8fde\u63a5\u3002
4\u3001\u63a7\u5236\u8fde\u63a5\u59cb\u7ec8\u7b49\u5f85\u5ba2\u6237\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u901a\u4fe1\u3002\u8be5\u8fde\u63a5\u5c06\u547d\u4ee4\u4ece\u5ba2\u6237\u4f20\u7ed9\u670d\u52a1\u5668\uff0c\u5e76\u4f20\u56de\u670d\u52a1\u5668\u7684\u5e94\u7b54\u3002\u7531\u4e8e\u547d\u4ee4\u901a\u5e38\u662f\u7531\u7528\u6237\u952e\u5165\u7684\uff0c\u6240\u4ee5IP\u5bf9\u63a7\u5236\u8fde\u63a5\u7684\u670d\u52a1\u4e3b\u8981\u8d23\u4efb\u5c31\u662f\u201c\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c0f\u8fdf\u5ef6\u201d\u3002
\u6269\u5c55\u8d44\u6599\uff1a
FTP\u534f\u8bae\u5305\u62ec\u4e24\u4e2a\u7ec4\u6210\u90e8\u5206\uff0c\u5176\u4e00\u4e3aFTP\u670d\u52a1\u5668\uff0c\u5176\u4e8c\u4e3aFTP\u5ba2\u6237\u7aef\u3002\u5176\u4e2dFTP\u670d\u52a1\u5668\u7528\u6765\u5b58\u50a8\u6587\u4ef6\uff0c\u7528\u6237\u53ef\u4ee5\u4f7f\u7528FTP\u5ba2\u6237\u7aef\u901a\u8fc7FTP\u534f\u8bae\u8bbf\u95ee\u4f4d\u4e8eFTP\u670d\u52a1\u5668\u4e0a\u7684\u8d44\u6e90\u3002
\u5728\u5f00\u53d1\u7f51\u7ad9\u7684\u65f6\u5019\uff0c\u901a\u5e38\u5229\u7528FTP\u534f\u8bae\u628a\u7f51\u9875\u6216\u7a0b\u5e8f\u4f20\u5230Web\u670d\u52a1\u5668\u4e0a\u3002\u6b64\u5916\uff0c\u7531\u4e8eFTP\u4f20\u8f93\u6548\u7387\u975e\u5e38\u9ad8\uff0c\u5728\u7f51\u7edc\u4e0a\u4f20\u8f93\u5927\u7684\u6587\u4ef6\u65f6\uff0c\u4e00\u822c\u4e5f\u91c7\u7528\u8be5\u534f\u8bae\u3002
\u9ed8\u8ba4\u60c5\u51b5\u4e0bFTP\u534f\u8bae\u4f7f\u7528TCP\u7aef\u53e3\u4e2d\u7684 20\u548c21\u8fd9\u4e24\u4e2a\u7aef\u53e3\uff0c\u5176\u4e2d20\u7528\u4e8e\u4f20\u8f93\u6570\u636e\uff0c21\u7528\u4e8e\u4f20\u8f93\u63a7\u5236\u4fe1\u606f\u3002\u4f46\u662f\uff0c\u662f\u5426\u4f7f\u752820\u4f5c\u4e3a\u4f20\u8f93\u6570\u636e\u7684\u7aef\u53e3\u4e0eFTP\u4f7f\u7528\u7684\u4f20\u8f93\u6a21\u5f0f\u6709\u5173\uff0c\u5982\u679c\u91c7\u7528\u4e3b\u52a8\u6a21\u5f0f\uff0c\u90a3\u4e48\u6570\u636e\u4f20\u8f93\u7aef\u53e3\u5c31\u662f20\uff1b\u5982\u679c\u91c7\u7528\u88ab\u52a8\u6a21\u5f0f\uff0c\u5219\u5177\u4f53\u6700\u7ec8\u4f7f\u7528\u54ea\u4e2a\u7aef\u53e3\u8981\u670d\u52a1\u5668\u7aef\u548c\u5ba2\u6237\u7aef\u534f\u5546\u51b3\u5b9a\u3002
\u7edf\u4e00\u752853\u53f7\u7aef\u53e3\uff0cTCP\u548cUDP\u90fd\u53ef\u4ee5
\u3002\u3002\u3002
53/TCP,UDP Domain Name System (DNS) Official
54/TCP,UDP XNS (Xerox Network Services) Clearinghouse Official
56/TCP,UDP XNS (Xerox Network Services) Authentication Official
56/TCP,UDP RAP (Route Access Protocol)[4] Unofficial
57/TCP MTP, Mail Transfer Protocol Unofficial
58/TCP,UDP XNS (Xerox Network Services) Mail Official
67/UDP Bootstrap Protocol (BOOTP) Server; also used by Dynamic Host Configuration Protocol (DHCP) Official
68/UDP Bootstrap Protocol (BOOTP) Client; also used by Dynamic Host Configuration Protocol (DHCP) Official
69/UDP Trivial File Transfer Protocol (TFTP) Official
70/TCP Gopher protocol Official
79/TCP Finger protocol
\u3002\u3002\u3002
DNS即使用tcp,又使用udp;不过是分情况的:
区域传输的时候用tcp,其它时候用udp;
区域传输:dns的规范规定了2种类型的dns服务器,一个叫主dns服务器,一个叫辅助dns服务器。在一个区中主dns服务器从自己本机的数据文件中读取该区的dns数据信息,而辅助dns服务器则从区的权威dns服务器中读取该区的dns数据信息。当一个辅助dns服务器启动时,它需要与主dns服务器通信,并加载数据信息,这就叫做区域传输(zone transfer).
..DNS服务使用UDP53号端口,,FTP使用TCP20,21端口.
DNS 服务器 是 UDP
FTP服务器是 TCP
tcp
绛旓細绠鍗曟潵璇达紝FTP鏈嶅姟鍣涓昏鐢ㄤ簬鏂囦欢鐨勫瓨鍌ㄥ拰浼犺緭锛屼娇鐢ㄦ埛鍙互鍦ㄤ簰鑱旂綉涓婂垎浜垨鑾峰彇鏂囦欢锛涜DNS鏈嶅姟鍣鐨勪富瑕佽亴璐f槸瑙f瀽鍩熷悕锛岀‘淇濈敤鎴疯兘澶熼氳繃鍩熷悕璁块棶浜掕仈缃戜笂鐨勫悇涓湇鍔℃垨缃戠珯銆傚畠浠殑宸紓涓昏浣撶幇鍦ㄥ叾搴旂敤棰嗗煙鐨勪笉鍚屼互鍙婃墍鎻愪緵鐨勬湇鍔′笂銆備袱鑰呯浉浜掔嫭绔嬶紝浣嗗崗鍚屽伐浣滀互纭繚缃戠粶鐨勯『鐣呭拰淇℃伅鐨勬湁鏁堜紶閫掋侳TP鏈嶅姟鍣...
绛旓細FTP 鏄疐ile Transfer Protocol锛鏂囦欢浼犺緭鍗忚锛夌殑鑻辨枃绠绉帮紝鑰屼腑鏂囩畝绉颁负鈥滄枃浼犲崗璁濄傜敤浜嶪nternet涓婄殑鎺у埗鏂囦欢鐨勫弻鍚戜紶杈撱傚悓鏃讹紝瀹冧篃鏄竴涓簲鐢ㄧ▼搴忥紙Application锛夈傜敤鎴峰彲浠ラ氳繃瀹冩妸鑷繁鐨凱C鏈轰笌涓栫晫鍚勫湴鎵鏈夎繍琛孎TP鍗忚鐨鏈嶅姟鍣鐩歌繛锛岃闂湇鍔″櫒涓婄殑澶ч噺绋嬪簭鍜屼俊鎭 FTP鐨勪富瑕佷綔鐢紝灏辨槸璁╃敤鎴疯繛鎺ヤ笂涓...
绛旓細DNS涓妸涓绘満鍚嶆寚鎴愪笉涓鏍风殑灏卞彲浠ヤ簡銆傛瘮濡俉WW+浣犵殑鍩熷悕锛岃繖涓氨鏄綘web鏈嶅姟鍣锛FTP+浣犵殑鍩熷悕锛屽氨鏄綘鐨FTP鏈嶅姟鍣锛屽氨鍙互浜嗐傝闂殑鏃跺欙紝web灏辨槸涓塛锛ftp锛屽氨鏄痜tp銆傜煡閬撲笉锛
绛旓細FTP鏈嶅姟鍣ㄥ湪浣跨敤鍓嶅繀椤昏鍏堢櫥褰曡幏鍙栬繙绋嬭繛鎺ュ悗锛岀敤鎴锋墠鑳芥帴瑙﹀埌鎵闇鏂囦欢銆傜敤鎴锋兂瑕佸彇璧拌嚜宸辨兂瑕佺殑鏂囦欢閫氬父鏈変袱绉嶆柟寮忥紝涓绉嶆槸Standard 锛屽嵆PORT鏂瑰紡锛屾槸涓绉嶄富鍔涓庢湇鍔″櫒杩炴帴鐨勬柟寮忥紱鍙︿竴绉嶆槸Passive锛屽嵆PASV鏂瑰紡锛屾槸涓绉嶈鍔ㄥ拰鏈嶅姟鍣ㄨ繛鎺ョ殑鏂瑰紡銆侳TP鍗忚杩炴帴浣撶郴 鎯宠鍙栬蛋鎯宠鐨勬枃浠跺繀椤昏缁忚繃涓夐噸闂ㄣ傜涓...
绛旓細銆愮瓟妗堛戯細C C銆愯В鏋愩戝湪DNS鏈嶅姟鍣涓紝璧勬簮璁板綍鏄寚鍖哄煙涓殑涓缁勭粨鏋勫寲鐨勮褰曘傚父鐢ㄧ殑璧勬簮璁板綍鍖呮嫭锛氫富鏈哄湴鍧璧勬簮璁板綍锛屽畠灏咲NS鍩熷悕鏄犲皠鍒癐P鍦板潃锛涢偖浠朵氦鎹㈠櫒璧勬簮璁板綍锛屼负閭欢浜ゆ崲鍣ㄤ富鏈烘彁渚涢偖浠惰矾鐢憋紱鍒悕璧勬簮璁板綍锛屽皢鍒悕鏄犲皠鍒版爣鍑咲NS鍩熷悕銆侱NS鏈嶅姟鍣ㄤ腑娌℃湁FTP鏈嶅姟鍣ㄨ繖涓璧勬簮璁板綍銆
绛旓細FTP鏈嶅姟鍣銆DNS鏈嶅姟鍣绛夌瓑銆傛暟鎹簱鏈嶅姟鍣ㄨ礋璐e瓨鍌ㄥ拰绠$悊鏁版嵁搴擄紝FTP鏈嶅姟鍣ㄨ礋璐f枃浠朵紶杈擄紝DNS鏈嶅姟鍣ㄨ礋璐e煙鍚嶈В鏋愩傝繖浜涙湇鍔″櫒缁熺О涓哄簲鐢ㄦ湇鍔″櫒銆傜患涓婃墍杩帮紝鏈嶅姟鍣ㄦ槸涓绉嶉噸瑕佺殑璁$畻鏈虹郴缁燂紝瀹冩壙鎷呯潃寰堝閲嶈鐨勪换鍔°傛湇鍔″櫒鐨勪綔鐢ㄤ笉浠呬粎鏄彁渚涙湇鍔★紝杩樺彲浠ユ彁楂樼郴缁熺殑鍙潬鎬у拰瀹夊叏鎬с
绛旓細闄や簡鍩烘湰鐨勫煙鍚嶈В鏋愬姛鑳藉锛孌NS鍩熷悕鏈嶅姟鍣杩樺彲浠ユ彁渚涘叾浠栨湇鍔″畾浣嶅姛鑳姐備緥濡傦紝瀹冨彲浠ュ畾浣嶇數瀛愰偖浠舵湇鍔″櫒銆FTP鏈嶅姟鍣绛夈傚綋鎴戜滑鍦ㄧ數瀛愰偖浠跺鎴风涓緭鍏ラ偖浠跺湴鍧鏃讹紝DNS鏈嶅姟鍣浼氬府鍔╂垜浠壘鍒板搴旂殑閭欢鏈嶅姟鍣ㄥ湴鍧锛屼粠鑰屽缓绔嬭繛鎺ュ苟鍙戦佹垨鎺ユ敹閭欢銆傝繖浜涘姛鑳介兘鏋佸ぇ鍦扮畝鍖栦簡鎴戜滑浣跨敤浜掕仈缃戠殑杩囩▼銆傛荤殑鏉ヨ锛DNS鍩熷悕...
绛旓細FTP鏄疐ile Transfer Protocol锛鏂囦欢浼犺緭鍗忚锛夌殑缂╁啓锛岀敤鏉ュ湪涓ゅ彴璁$畻鏈轰箣闂翠簰鐩镐紶閫佹枃浠躲傜浉姣斾簬HTTP锛孎TP鍗忚瑕佸鏉傚緱澶氥傚鏉傜殑鍘熷洜锛屾槸鍥犱负FTP鍗忚瑕佺敤鍒颁袱涓猅CP杩炴帴锛屼竴涓槸鍛戒护閾捐矾锛岀敤鏉ュ湪FTP瀹㈡埛绔涓庢湇鍔″櫒涔嬮棿浼犻掑懡浠わ紱鍙︿竴涓槸鏁版嵁閾捐矾锛岀敤鏉ヤ笂浼犳垨涓嬭浇鏁版嵁銆侳TP鍗忚鏈変袱绉嶅伐浣滄柟寮忥細PORT鏂瑰紡鍜...
绛旓細鍐呯綉鐢╯erv-u寤虹珛FTP鏈嶅姟鍣,璁剧疆浜咺P192.168.1.251,鍦ㄥ唴缃戜腑鍙互鐢╢tp://192.168.1.251鏉ョ櫥褰旻TP銆傜幇鍦ㄦ鐢ㄥ煙鍚嶆潵鐧诲綍FTP,姣斿閫傜敤ftp.domain.com鏉ョ櫥褰旻TP,璇烽棶浣跨敤DNS鏈嶅姟鍣鏉ヨВ... 鍐呯綉鐢╯erv-u寤虹珛FTP鏈嶅姟鍣,璁剧疆浜咺P192.168.1.251,鍦ㄥ唴缃戜腑鍙互鐢╢tp://192.168.1.251鏉ョ櫥褰旻TP銆傜幇鍦ㄦ鐢ㄥ煙鍚嶆潵鐧诲綍FTP,姣斿...
绛旓細FTP鏈嶅姟鍣ㄧ殑鍦板潃閫氬父鏄竴涓狪P鍦板潃鎴鍩熷悕銆侳TP锛堟枃浠朵紶杈撳崗璁級鏈嶅姟鍣ㄦ槸鐢ㄤ簬鍦ㄧ綉缁滀笂浼犺緭鏂囦欢鐨勮绠楁満鏈嶅姟鍣ㄣ備负浜嗚闂FTP鏈嶅姟鍣紝鐢ㄦ埛闇瑕佺煡閬撴湇鍔″櫒鐨勫湴鍧銆傝繖涓湴鍧鍙互鏄竴涓狪P鍦板潃鎴栦竴涓煙鍚嶃1. IP鍦板潃锛氫簰鑱旂綉涓婄殑姣忎竴鍙拌绠楁満閮芥湁涓涓敮涓鐨処P鍦板潃銆傝繖涓湴鍧鐢卞洓缁勬暟瀛楃粍鎴愶紝姣忕粍鏁板瓧涔嬮棿鐢ㄧ偣锛....