{"id":890,"date":"2019-10-29T11:05:40","date_gmt":"2019-10-29T03:05:40","guid":{"rendered":"http:\/\/149.129.74.185\/?p=890"},"modified":"2019-10-29T15:53:55","modified_gmt":"2019-10-29T07:53:55","slug":"%e8%ae%a1%e7%ae%97%e6%9c%ba%e7%bd%91%e7%bb%9cweek-7-note","status":"publish","type":"post","link":"http:\/\/www.magicmipamipa.com\/?p=890","title":{"rendered":"[\u8ba1\u7b97\u673a\u7f51\u7edc]Week 7 Note"},"content":{"rendered":"<p>Shortest Path\u6700\u77ed\u8def\u5f84\u7b97\u6cd5<\/p>\n<p>Flooding \u6cdb\u6d2a\u7b97\u6cd5<\/p>\n<p>Distance Vector Routing \u8ddd\u79bb\u77e2\u91cf\u7b97\u6cd5<\/p>\n<p>\u6c34\u5e73\u5206\u88c2\u6cd5\u00a0\u00a0\u4fdd\u6301\u5b9a\u65f6\u5668 Timehold<\/p>\n<p>Link State Routing \u94fe\u8def\u72b6\u6001\u8def\u7531\u7b97\u6cd5<\/p>\n<p>Each router must do the following:<\/p>\n<p>1.\u8bbf\u95ee\u90bb\u5c45\uff0c\u5b66\u4e60\u4ed6\u4eec\u7684\u7f51\u7edc\u5730\u5740\uff08\u8def\u7531\u8868\uff09<\/p>\n<p>\u901a\u8fc7\u5e7f\u64ad\u94fe\u8def\u8fde\u63a5\uff0c\u5f53\u6709\u51e0\u4e2a\u8def\u7531\u5668\u94fe\u63a5\u65f6\uff0c\u4f1a\u5b58\u5728\u4e00\u4e2a\u201c\u4ee3\u8868\u8def\u7531\u5668\u201d\u4ea4\u4e92\u5176\u4f59\u8def\u7531\u5668\u7684\u4fe1\u606f\uff08\u4e2d\u7ee7\uff09\u3002<\/p>\n<blockquote><p><span style=\"font-size: 16px;\"><em>MEMO:\u591a\u64ad\u8def\u7531\u534f\u8bae<\/em><\/span><\/p>\n<div class=\"para\" label-module=\"para\"><span style=\"font-size: 16px;\"><em>\u5b9e\u73b0IP\u591a\u64ad\u8def\u7531\u4e00\u822c\u65b9\u5f0f\u662f\u5728\u591a\u64ad\u7ec4\u6210\u5458\u4e4b\u95f4\u6784\u9020\u4e00\u68f5\u591a\u64ad\u6811\u3002\u591a\u64ad\u6811\u662f\u6839\u4e3a\u6e90\u8282\u70b9\u4e14\u8986\u76d6\u6240\u6709\u591a\u64ad\u6210\u5458\u7684\u4e00\u68f5\u751f\u6210\u6811\uff0c\u4e0d\u540c\u7684IP\u591a\u64ad\u8def\u7531\u534f\u8bae\u4f7f\u7528\u4e0d\u540c\u7684\u6280\u672f\u6765\u6784\u9020\u8fd9\u4e9b\u591a\u64ad\u751f\u6210\u6811\uff0c\u4e00\u65e6\u8fd9\u4e2a\u6811\u6784\u9020\u5b8c\u6210)\u6240\u6709\u7684\u591a\u64ad\u6d41\u91cf\u90fd\u5c06\u901a\u8fc7\u5b83\u6765\u4f20\u64ad\u3002<sup class=\"sup--normal\" data-sup=\"1\" data-ctrmap=\":1,\">\u00a0<\/sup><\/em><\/span><\/div>\n<\/blockquote>\n<p>2.\u6d4b\u91cf\u5230\u4ed6\u7684\u6bcf\u4e2a\u90bb\u5c45\u7684\u5ef6\u8fdfDelay\u548c\u6210\u672cCost<\/p>\n<p>3.\u6784\u9020\u4e00\u4e2a\u5305\u542b\u5b83\u6240\u6709\u5b66\u5230\u7684\u94fe\u8def\u4fe1\u606f\u5305 \uff08\u56fe\uff09<\/p>\n<p>4.\u5c06\u8fd9\u4e2a\u5305\u53d1\u7ed9\u6240\u6709\u5176\u4ed6\u8def\u7531\uff0c\u5e76\u63a5\u53d7\u6765\u81ea\u6240\u6709\u5176\u4ed6\u8def\u7531\u5668\u7684\u4fe1\u606f\u5305<\/p>\n<p>5.\u8ba1\u7b97\u5230\u6bcf\u4e2a\u5176\u4ed6\u8def\u7531\u7684\u6700\u77ed\u8def\u5f84<\/p>\n<p>Dijkstra\u7b97\u6cd5\u5b9e\u73b0<\/p>\n<div class=\"para\" label-module=\"para\"><\/div>\n<div label-module=\"para\">Principle of OSPF OSPF\u5b9e\u9a8c<\/div>\n<ul>\n<li label-module=\"para\">\u94fe\u8def\u72b6\u6001\u8def\u7531\u534f\u8bae<\/li>\n<li label-module=\"para\">AS \u72ec\u7acb\u7ba1\u8f96\u3001\u81ea\u6cbb\u7cfb\u7edf\u00a0<span>Autonomous System<\/span><\/li>\n<li label-module=\"para\">Area \u533a\u57df<\/li>\n<li label-module=\"para\">OSPF\u8fd0\u884c\u5728AS\u5185\u90e8 area\u5168\u90e8\u5b9e\u73b0\u94fe\u8def<\/li>\n<li label-module=\"para\">\u8fb9\u754c\u8def\u7531\u5668\u6c47\u603barea\u5185\u90e8\u7684\u6240\u6709\u4fe1\u606f \u4e0e\u5176\u4ed6\u8fb9\u754c\u8def\u7531\u5668\u4ea4\u6362 \u51cf\u5c11\u4fe1\u606f\u4ea4\u6362\u91cf<\/li>\n<li label-module=\"para\">area0 backbone\u6838\u5fc3\u7f51\u7edc \u5176\u4f59area\u4e4b\u95f4\u4e0d\u9700\u8981\u4e92\u76f8\u8fde\u63a5 \u53ea\u94fe\u63a5area0\u5c31\u53ef\u4ee5\u4e86<\/li>\n<li label-module=\"para\">Area border Area\u8fb9\u754c\u8def\u7531\u5668\u5fc5\u987b\u8981\u5c5e\u4e8e\u4e00\u4e2aArea\uff0c\u76f8\u8fde\u7684\u63a5\u53e3\u5fc5\u987b\u5904\u4e8e\u540c\u4e00Area<\/li>\n<li label-module=\"para\">AS boundary AS\u8fb9\u754c\u8def\u7531\u5668 \u4ea4\u4e92\u65f6\u4f1a\u9690\u85cf\u4e00\u4e9b\u4fe1\u606f\/\u4fdd\u7559\u4fe1\u606f<\/li>\n<\/ul>\n<div label-module=\"para\">\n<blockquote>\n<div label-module=\"para\"><em><span style=\"font-size: 16px;\">\u00a0Route \u7f51\u7edc\u5c42 \u53ea\u662f\u8f6c\u53d1IP<\/span><\/em><\/div>\n<div label-module=\"para\"><em><span style=\"font-size: 16px;\">Gateway eg:\u8fd0\u8f93\u5c42\/\u7f51\u7edc\u5c42\/\u5e94\u7528\u5c42 \u6539\u53d8\u534f\u8bae<\/span><\/em><\/div>\n<\/blockquote>\n<\/div>\n<ul>\n<li label-module=\"para\">BGP protocol connects the ASes <strong>\u628a\u51b3\u7b56\u4ea4\u8fd8\u7ed9\u7ba1\u7406\u5458<\/strong><\/li>\n<\/ul>\n<blockquote>\n<div label-module=\"para\"><em><span style=\"font-size: 16px;\">\u8fb9\u754c\u7f51\u5173\u534f\u8bae\uff08BGP\uff09\u662f\u8fd0\u884c\u4e8e TCP \u4e0a\u7684\u4e00\u79cd\u81ea\u6cbb\u7cfb\u7edf\u7684\u8def\u7531\u534f\u8bae\u3002 BGP \u662f\u552f\u4e00\u4e00\u4e2a\u7528\u6765\u5904\u7406\u50cf\u56e0\u7279\u7f51\u5927\u5c0f\u7684\u7f51\u7edc\u7684\u534f\u8bae\uff0c\u4e5f\u662f\u552f\u4e00\u80fd\u591f\u59a5\u5584\u5904\u7406\u597d\u4e0d\u76f8\u5173\u8def\u7531\u57df\u95f4\u7684\u591a\u8def\u8fde\u63a5\u7684\u534f\u8bae\u3002 BGP \u6784\u5efa\u5728 EGP \u7684\u7ecf\u9a8c\u4e4b\u4e0a\u3002 BGP \u7cfb\u7edf\u7684\u4e3b\u8981\u529f\u80fd\u662f\u548c\u5176\u4ed6\u7684 BGP \u7cfb\u7edf\u4ea4\u6362\u7f51\u7edc\u53ef\u8fbe\u4fe1\u606f\u3002\u7f51\u7edc\u53ef\u8fbe\u4fe1\u606f\u5305\u62ec\u5217\u51fa\u7684\u81ea\u6cbb\u7cfb\u7edf\uff08AS\uff09\u7684\u4fe1\u606f\u3002\u8fd9\u4e9b\u4fe1\u606f\u6709\u6548\u5730\u6784\u9020\u4e86 AS \u4e92\u8054\u7684\u62d3\u6734\u56fe\u5e76\u7531\u6b64\u6e05\u9664\u4e86\u8def\u7531\u73af\u8def\uff0c\u540c\u65f6\u5728 AS \u7ea7\u522b\u4e0a\u53ef\u5b9e\u65bd\u7b56\u7565\u51b3\u7b56\u3002<\/span><\/em><\/div>\n<\/blockquote>\n<p>Route table example<\/p>\n<table style=\"width: 900px;\">\n<tbody>\n<tr>\n<td style=\"width: 335px;\">Destination<\/td>\n<td style=\"width: 379px;\">Subnet mask<\/td>\n<td style=\"width: 186px;\">Next hop<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 335px;\">128.96.40.0(00)<\/td>\n<td style=\"width: 379px;\">255.255.255.192<\/td>\n<td style=\"width: 186px;\">10.0.0.1<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 335px;\">128.96.40.64(01)<\/td>\n<td style=\"width: 379px;\">255.255.255.192<\/td>\n<td style=\"width: 186px;\">10.0.1.1<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 335px;\">128.96.40.128(10)<\/td>\n<td style=\"width: 379px;\">255.255.255.192<\/td>\n<td style=\"width: 186px;\">10.0.2.2<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 335px;\">128.96.40.192(110)<\/td>\n<td style=\"width: 379px;\">255.255.255.224<\/td>\n<td style=\"width: 186px;\">10.0.3.3<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 335px;\">0.0.0.0(default route)<\/td>\n<td style=\"width: 379px;\"><\/td>\n<td style=\"width: 186px;\">10.0.4.4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div label-module=\"para\">\u00a0192 = 11000000<\/div>\n<div label-module=\"para\">0 = 00000000<\/div>\n<div label-module=\"para\">64 = 01000000<\/div>\n<div label-module=\"para\">128 = 10000000<\/div>\n<div label-module=\"para\">224 = 11100000<\/div>\n<div label-module=\"para\">192 = 11000000<\/div>\n<div label-module=\"para\">Which router will be selected for these packets received?<\/div>\n<div label-module=\"para\">1.128.96.40.126(01111110) 128.96.40.64<\/div>\n<div label-module=\"para\">2.128.96.40.151 128.96.40.128<\/div>\n<div label-module=\"para\">3.128.96.40.200 128.96.40.192<\/div>\n<div label-module=\"para\">4.128.96.40.240 0.0.0.0<\/div>\n<div label-module=\"para\">5.128.96.40.17 128.96.40.0<\/div>\n<div label-module=\"para\">\u00a0\u6700\u957f\u63a9\u7801\u4f18\u5148<\/div>\n<div label-module=\"para\"><\/div>\n<div label-module=\"para\">ARP &#8211; The Address Resolution Protocol<\/div>\n<div label-module=\"para\">FDDI<\/div>\n<div label-module=\"para\">\u4e24\u4e2a\u7269\u7406\u63a5\u53e3\u4e0d\u53ef\u4ee5\u914d\u540c\u6837\u7684\u7f51\u7edc\u5b50\u7f51<\/div>\n<div label-module=\"para\">\u76ee\u6807\u80fd\u5426\u6536\u5230\u5e7f\u64ad-IP\u5b50\u7f51\u4e00\u81f4<\/div>\n<div label-module=\"para\">ARP\u54cd\u5e94\u65f6\u4f1a\u8fd4\u56deMAC\u5730\u5740<\/div>\n<div label-module=\"para\"><\/div>\n<div label-module=\"para\">Internet Control Message Protocol<\/div>\n<div label-module=\"para\">\u52a0\u65f6\u95f4\u6233<\/div>\n<div label-module=\"para\">Redirect<\/div>\n<div label-module=\"para\">Destination unreachable \u76ee\u6807\u4e0d\u53ef\u8fbe<\/div>\n<div label-module=\"para\">Redirect Teach a router about geography \u53ef\u80fd\u5b58\u5728\u6f0f\u6d1e<\/div>\n<div label-module=\"para\"><\/div>\n<div label-module=\"para\">NAT- Network Address Translation<\/div>\n<div label-module=\"para\">Private Address \u79c1\u6709\u5730\u5740\/\u5728\u4e92\u8054\u7f51\u4e0a\u4e0d\u5b58\u5728<\/div>\n<div label-module=\"para\">10.0.0.0 &#8211; 10.255.255.255\/8<\/div>\n<div label-module=\"para\">172.16.0.0-172.31.255.255\/12<\/div>\n<div label-module=\"para\">\u00a0192.168.0.0-192.168.255.255\/16<\/div>\n<div label-module=\"para\">\u5185\u7f51+\u7aef\u53e3 &lt;=&gt; \u516c\u7f51+\u7aef\u53e3<\/div>\n<div label-module=\"para\">NAT\u7a7f\u900f<\/div>\n<div label-module=\"para\">Problem:<\/div>\n<div label-module=\"para\">1.NAT\u8fdd\u53cd\u4e86IP\u7684\u7ed3\u6784<\/div>\n<div label-module=\"para\">2.NAT\u6253\u7834\u4e86Internet\u7684\u7aef-\u7aef\u7684\u8fde\u63a5\u6a21\u578b<\/div>\n<div label-module=\"para\">3.NAT\u5c06Internet\u4ece\u4e00\u4e2a\u65e0\u8fde\u63a5\u7f51\u7edc\u6539\u53d8\u6210\u4e86\u4e00\u4e2a\u9762\u5411\u8fde\u63a5\u7f51\u7edc\u7684\u7279\u6709\u5f62\u5f0f\u3002<\/div>\n<div label-module=\"para\">4.NAT\u8fdd\u53cd\u4e86\u6700\u57fa\u672c\u7684\u5206\u5c42\u534f\u8bae\uff0c\u5bf9\u4e0a\u5c42\u7684\u6709\u6548\u8f7d\u8377\u5b57\u6bb5\u505a\u51fa\u4e86\u5047\u8bbe\u3002<\/div>\n<div label-module=\"para\">5.NAT\u9700\u8981\u7684\u8fdb\u7a0b\u5fc5\u987b\u662fTCP\u6216UDP\u3002<\/div>\n<div label-module=\"para\">6.\u6709\u4e9b\u5e94\u7528\u4ee5\u89c4\u5b9a\u65b9\u5f0f\u4f7f\u7528\u591a\u4e2aTCP\/IP\u8fde\u63a5\u6216\u8005UDP\u7aef\u53e3\u3002<\/div>\n<div label-module=\"para\">FTP\u534f\u8bae<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Shortest Path\u6700\u77ed\u8def\u5f84\u7b97\u6cd5 Flooding \u6cdb\u6d2a\u7b97\u6cd5 Distance Vector  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[19,16],"tags":[],"_links":{"self":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/890"}],"collection":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=890"}],"version-history":[{"count":3,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/890\/revisions"}],"predecessor-version":[{"id":893,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/890\/revisions\/893"}],"wp:attachment":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=890"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}