{"id":811,"date":"2014-05-05T12:22:00","date_gmt":"2014-05-05T04:22:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=811"},"modified":"2023-11-05T12:24:03","modified_gmt":"2023-11-05T04:24:03","slug":"frame-control","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/811","title":{"rendered":"Frame Control"},"content":{"rendered":"\n<p><strong>Framing(\u8a0a\u6846\u5206\u5272)<\/strong><br>\u5c07\u8cc7\u6599\u6d41(\u591a\u500b\u9023\u7e8c\u7684frame)\u900f\u904e\u8fa8\u8b58\u7b26\u865f\u5206\u958b<br>\u5e38\u898b\u6709\u4ee5\u4e0b\u65b9\u6cd5<\/p>\n\n\n\n<p><strong>character count(\u5b57\u5143\u8a08\u6578)<\/strong><br>\u8f03\u5c11\u4f7f\u7528<br>\u5728frame\u7b2c\u4e00\u500b\u5b57\u5143\u8a18\u9304\u8a72frame\u7684\u5b57\u5143\u6578<br>ex:<br>51234<br>\u7b2c1\u500b\u5b57\u5143\u70ba5,\u8868\u793a\u8a72frame\u5171\u67095\u500b<\/p>\n\n\n\n<p><strong>Start and end bytes(with byte stuffing),\u4f4d\u5143\u7d44\u5c0e\u5411\/\u5b57\u5143\u5c0e\u5411<\/strong><br>ex:sentinel approach(\u5d17\u54e8\u6cd5)<\/p>\n\n\n\n<p><strong>Start and end flags(with bit stuffing),\u4f4d\u5143\u5c0e\u5411\u3000<\/strong><br>\u61c9\u7528:HDLC<br>1\u5c07\u958b\u59cb\u548c\u7d50\u675f\u752801111110\u505a\u8a18\u9304<br>2\u6bcf\u500bframe\u4e2d,\u82e5\u51fa\u73fe\u9023\u7e8c5\u500b1\u5247\u81ea\u52d5\u5dee\u5165\u4e00\u500b0<br>ex:<br>0110111111101<br>\u6703\u8b8a\u6210<br>011111100110111110110101111110<\/p>\n\n\n\n<p><strong>\u7531\u5be6\u9ad4\u5c64\u8fa8\u8b58\u3000<\/strong><br>\u61c9\u7528:sonet<\/p>\n\n\n\n<p><br>&#8230;<\/p>\n\n\n\n<p><strong>Error Detection<\/strong><br>\u4f7f\u7528redundancy(\u5197\u4f4d)\u6982\u5ff5\u589e\u52a0\u984d\u5916\u7684\u4f4d\u5143\u4ee5\u4fbf\u5728\u76ee\u7684\u5730\u5075\u6e2c\u932f\u8aa4<\/p>\n\n\n\n<p><strong>\u5e38\u898b\u5e8f\u5217\u50b3\u8f38\u932f\u8aa4\u6709<\/strong><br>frame error(\u8cc7\u6599\u6846\u932f\u8aa4)<br>receive overrun error(\u63a5\u6536\u903e\u8d8a\u932f\u8aa4)<br>parity check error(\u540c\u4f4d\u6aa2\u67e5\u932f\u8aa4)<\/p>\n\n\n\n<p>&#8230;<\/p>\n\n\n\n<p><strong>\u932f\u8aa4\u63a7\u5236\u5e38\u7528\u539f\u7406\u6709<\/strong><br>parity check<br>redundancy check<br>Hamming Code<\/p>\n\n\n\n<p><br><strong>parity check(\u540c\u4f4d\u6aa2\u67e5)<\/strong><br>\u9069\u7528\u65bc\u975e\u540c\u6b65\u50b3\u8f38<br>\u539f\u7406:\u589e\u52a0\u4e00\u500bparity bit\u6aa2\u67e5\u8cc7\u6599\u662f\u5426\u6709\u8aa4<br>\u4f9dparity bit\u8981\u7528\u5947\u5076\u6578\u5206\u70ba<br>\u3000odd parity check(\u5947\u6578\u540c\u4f4d\u6aa2\u67e5)<br>\u3000even parity check(\u5076\u6578\u540c\u4f4d\u6aa2\u67e5)<br>\u4f9d\u8a08\u7b97\u65b9\u6cd5\u53ef\u5206\u70ba<br>\u3000VRC(vertical redundancy check,\u5782\u76f4\u91cd\u8986\u6aa2\u67e5),\u8fd1\u7aef\u7528,\u4e00\u822c\u7684parity check,\u6aa2\u67e5\u5217\u7684parity bit&nbsp;<br>\u3000LRC(lognitudinal redundancy check,\u6c34\u5e73\u91cd\u8986\u6aa2\u67e5),\u6aa2\u67e5\u884c\u7684parity bit<br>\u3000two-dimensional parity(\u4e8c\u7dad\u540c\u4f4d),\u6aa2\u67e5\u5217\u548c\u884c\u7684parity bit,\u53ef\u660e\u78ba\u6307\u51fa\u932f\u8aa4\u767c\u751f\u5730\u65b9<\/p>\n\n\n\n<p><br><strong>Redundancy Check(\u91cd\u8986\u6aa2\u67e5)<\/strong><br>\u9069\u7528\u65bc\u540c\u6b65\u50b3\u8f38<br>\u65b9\u6cd5<br>1\u4f7f\u7528\u7b97\u8853\u51fd\u6578\u5c0d\u8cc7\u6599\u9032\u884c\u8a08\u7b97\u5f97\u5230\u932f\u8aa4\u6aa2\u67e5\u78bc<br>2\u932f\u8aa4\u6aa2\u67e5\u78bc\u6703\u96a8\u8cc7\u6599\u4e00\u8d77\u50b3\u9001\u5230\u63a5\u6536\u65b9,\u5728\u7531\u63a5\u6536\u65b9\u4f7f\u7528\u76f8\u540c\u7b97\u8853\u51fd\u6578\u5c0d\u8cc7\u6599\u9032\u884c\u8a08\u7b97\u5f97\u932f\u8aa4\u6aa2\u67e5\u78bc<br>3\u82e5\u932f\u8aa4\u6aa2\u67e5\u78bc\u8207\u50b3\u9001\u65b9\u4e00\u6a23\u8868\u793a\u8cc7\u6599\u6b63\u78ba<br>\u53ef\u5206\u70ba<br>\u3000CRC<br>\u3000checksum:\u5c07\u8cc7\u6599\u52a0\u7e3d\u5f8c\u53d6\u88dc\u6578<\/p>\n\n\n\n<p><br><strong>Hamming Code(\u6f22\u660e\u78bc)<\/strong><br>\u5177\u6709\u90e8\u4efd\u932f\u8aa4\u66f4\u6b63\u80fd\u529b<br>\u5728\u8cc7\u6599\u4e2d\u52a0\u5165\u984d\u5916parity check bit,\u4e26\u4f7f\u7528hamming distance(\u6f22\u660e\u8ddd\u96e2)<\/p>\n\n\n\n<p>\u61c9\u7528<br><strong>\u8a2d\u8a08\u5728\u5be6\u9ad4\u5c64\u8b93\u8cc7\u6599\u93c8\u7d50\u5c64\u7528<\/strong><br>VRC<br>LRC<br>CRC<br><strong>\u61c9\u7528\u5728tcp,udp<\/strong><br>checksum<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n\n\n\n<p><strong>CRC(Cyclic Redundancy Check,\u5faa\u74b0\u91cd\u8986\u6aa2\u67e5)<\/strong><br>\u548cFCS\u5f88\u50cf,\u9060\u7aef\u7528<br>\u5e38\u898bCRC\u6709CRC-8\u3001CRC-16\u3001CRC-32&nbsp;<br>CRC\u4f4d\u5143\u5bec\u5ea6\u8d8a\u9577\uff0c\u5075\u932f\u6548\u679c\u8d8a\u597d,\u4f46\u8981\u591a\u82b1\u6642\u9593\u50b3\u9001CRC\u78bc<\/p>\n\n\n\n<p><strong>CRC\u8a08\u7b97\u516c\u5f0f: R= D*2^r \/ G<\/strong><br>R:CRC\u4f4d\u5143<br>D:\u8cc7\u6599\u4f4d\u5143<br>G:\u7522\u751f\u5668,\u4e0d\u540c\u7248\u672c\u7684CRC,\u7522\u751f\u5668\u6703\u4e0d\u540c &nbsp;<br>r:CRC\u4f4d\u5143\u7684\u5bec\u5ea6,\u53ef\u5f9eG\u63a8\u7b97,ex:G=1001\uff0c\u5247r=3<\/p>\n\n\n\n<p>ex:<br>G=1011,r=3,D=11010011101100<br>\u8a08\u7b97\u904e\u7a0b\u5982\u4e0b<br>11010011101100 000 &lt;&#8212; input right padded by 3 bits (2^3)<br>1011 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;&#8212; divisor(G)<br>01100011101100 000 &lt;&#8212; result (G xor D*2^3 )<br>-1011 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;&#8212; divisor(G)<br>00111011101100 000<br>&#8212;1011<br>00010111101100 000<br>&#8212;-1011<br>00000001101100 000<br>&#8212;&#8212;&#8212;-1011<br>00000000110100 000<br>&#8212;&#8212;&#8212;&#8211;1011<br>00000000011000 000<br>&#8212;&#8212;&#8212;&#8212;-1011<br>00000000001110 000<br>&#8212;&#8212;&#8212;&#8212;&#8211;1011<br>00000000000101 000<br>&#8212;&#8212;&#8212;&#8212;&#8212;-101 1<br>=================<br>00000000000000 100 &lt;&#8212; remainder (R)<\/p>\n\n\n\n<p><br>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n\n\n\n<p><strong>Error Recovery<\/strong><br>\u7576\u50b3\u8f38\u6642\u767c\u751f\u932f\u8aa4\uff0c\u50b3\u9001\u7aef\u91cd\u65b0\u50b3\u9001\u7684\u6a5f\u5236<br>\u4e3b\u8981\u6709\u4ee5\u4e0b\u5169\u7a2e<br>FEC(forward error correction,\u524d\u9032\u5f0f\u932f\u8aa4\u66f4\u6b63)<br>\u3000two-dimensional parity check \u3000<br>ARQ(automatic repeat request,\u81ea\u52d5\u91cd\u8986\u8981\u6c42)<br>\u3000\u53ef\u5206\u70ba<br>\u3000stop-and-wait method (\u4e00\u822c\u8fd1\u8ddd\u96e2\u50b3\u8f38\u4f7f\u7528)<br>\u3000go-back automatic repeat request<br>\u3000select-repeat automatic repeat request<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Framing(\u8a0a\u6846\u5206\u5272)\u5c07\u8cc7\u6599\u6d41(\u591a\u500b\u9023\u7e8c\u7684frame)\u900f &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[26],"tags":[],"class_list":["post-811","post","type-post","status-publish","format-standard","hentry","category-osi-layer2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=811"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/811\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}