{"id":671,"date":"2025-12-25T08:53:03","date_gmt":"2025-12-25T00:53:03","guid":{"rendered":"https:\/\/www.axeuh.com\/?p=671"},"modified":"2025-12-25T10:44:56","modified_gmt":"2025-12-25T02:44:56","slug":"%e7%bb%84%e5%bb%ba%e5%b0%8f%e5%9e%8b%e5%b1%80%e5%9f%9f%e7%bd%911","status":"publish","type":"post","link":"https:\/\/www.axeuh.com\/index.php\/2025\/12\/25\/%e7%bb%84%e5%bb%ba%e5%b0%8f%e5%9e%8b%e5%b1%80%e5%9f%9f%e7%bd%911\/","title":{"rendered":"\u7ec4\u5efa\u5c0f\u578b\u5c40\u57df\u7f511"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.axeuh.com\/wp-content\/uploads\/2025\/12\/image-7-724x1024.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"1024\" data-original=\"https:\/\/www.axeuh.com\/wp-content\/uploads\/2025\/12\/image-7-724x1024.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-676\" style=\"width:840px;height:auto\"  sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/div><\/figure>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><h2>\u9636\u6bb5\u4e00\uff1a\u7ec8\u7aef\u8bbe\u5907\u57fa\u7840\u914d\u7f6e<\/h2>\n<p>\u9996\u5148\uff0c\u786e\u4fdd\u5e95\u5c42\u8bbe\u5907\u7684\u201c\u8eab\u4efd\u201d\u548c\u201c\u7f51\u5173\u201d\u4fe1\u606f\u65e0\u8bef\u3002<\/p>\n<ul>\n<li><strong>PC0<\/strong>: IP <code>192.168.10.1<\/code> | \u5b50\u7f51 <code>255.255.255.0<\/code> | \u7f51\u5173 <code>192.168.10.254<\/code> | DNS <code>200.0.0.1<\/code><\/li>\n<li><strong>PC1<\/strong>: IP <code>192.168.20.1<\/code> | \u5b50\u7f51 <code>255.255.255.0<\/code> | \u7f51\u5173 <code>192.168.20.254<\/code> | DNS <code>200.0.0.1<\/code><\/li>\n<li><strong>Web Server<\/strong>: IP <code>200.0.0.1<\/code> | \u5b50\u7f51 <code>255.255.255.0<\/code> | \u7f51\u5173 <code>200.0.0.254<\/code><\/li>\n<\/ul>\n<hr>\n<h2>\u9636\u6bb5\u4e8c\uff1a\u63a5\u5165\u5c42\u4ea4\u6362\u673a\uff08Sw21 &amp; Sw22\uff09<\/h2>\n<p>\u4efb\u52a1\uff1a\u5212\u5206 VLAN \u5e76\u5efa\u7acb\u5411\u4e0a\u8fde\u5411\u6838\u5fc3\u4ea4\u6362\u673a\u7684\u201c\u9ad8\u901f\u516c\u8def\u201d\uff08Trunk\uff09\u3002<\/p>\n<h3>Sw21 \u914d\u7f6e\uff1a<\/h3>\n<pre><code class=\"language-bash\">en\nconf t\nvlan 10\n name computer\nexit\nint fa0\/1\n sw mode acc\n sw acc vlan 10\nexit\nint fa0\/2           ! \u8fde\u63a5Sw1\u7684\u63a5\u53e3\n sw mode trunk      ! \u5141\u8bb8VLAN 10\u901a\u8fc7\n\n<\/code><\/pre>\n<h3>Sw22 \u914d\u7f6e\uff1a<\/h3>\n<pre><code class=\"language-bash\">en\nconf t\nvlan 20\n name accounting\nexit\nint fa0\/1\n sw mode acc\n sw acc vlan 20\nexit\nint fa0\/3           ! \u8fde\u63a5Sw1\u7684\u63a5\u53e3\n sw mode trunk      ! \u5141\u8bb8VLAN 20\u901a\u8fc7\n\n<\/code><\/pre>\n<hr>\n<h2>\u9636\u6bb5\u4e09\uff1a\u6838\u5fc3\u4ea4\u6362\u673a\uff08Sw1\uff09\u914d\u7f6e<\/h2>\n<p><strong>\u6838\u5fc3\u903b\u8f91<\/strong>\uff1aSw1 \u662f\u7f51\u7edc\u7684\u4e2d\u67a2\uff0c\u5b83\u65e2\u8981\u8d1f\u8d23 VLAN \u95f4\u7684\u901a\u4fe1\uff0c\u53c8\u8981\u4f5c\u4e3a\u8def\u7531\u5668\u4e0e R1 \u901a\u4fe1\u3002<\/p>\n<pre><code class=\"language-bash\">en\nconf t\nip routing          ! \u3010\u5173\u952e\u3011\u5f00\u542f\u4e09\u5c42\u8f6c\u53d1\u529f\u80fd\uff0c\u5426\u5219\u65e0\u6cd5\u8de8\u7f51\u6bb5\u901a\u4fe1\n\n! 1. \u914d\u7f6e VLAN \u63a5\u53e3\uff08\u4f5c\u4e3a PC \u7684\u7f51\u5173\uff09\nvlan 10\nvlan 20\nexit\nint vlan 10\n ip add 192.168.10.254 255.255.255.0\nint vlan 20\n ip add 192.168.20.254 255.255.255.0\n\n! 2. \u914d\u7f6e\u8fde\u63a5 R1 \u7684\u4e09\u5c42\u63a5\u53e3\nint fa0\/24\n no switchport      ! \u3010\u5173\u952e\u3011\u5c06\u4e8c\u5c42\u53e3\u8f6c\u4e3a\u4e09\u5c42\u8def\u7531\u53e3\n ip add 192.168.40.1 255.255.255.0\n\n! 3. \u914d\u7f6e\u9ed8\u8ba4\u8def\u7531\u6307\u5411\u51fa\u53e3\u8def\u7531\u5668 R1\nip route 0.0.0.0 0.0.0.0 192.168.40.2\n\n! \u5f00\u542f Telnet \u8fdc\u7a0b\u767b\u5f55\nline vty 0 4\n password cisco\n login\nexit\nenable password cisco\n\n<\/code><\/pre>\n<hr>\n<h2>\u9636\u6bb5\u56db\uff1a\u8def\u7531\u5668\uff08R1 &amp; R3\uff09\u914d\u7f6e<\/h2>\n<p>\u4efb\u52a1\uff1a\u5b9e\u73b0\u5916\u7f51\u6253\u901a\u3001Loopback \u63a5\u53e3\u4ee5\u53ca\u8fdc\u7a0b\u767b\u5f55\u529f\u80fd\u3002<\/p>\n<h3>R1 \u914d\u7f6e\uff08\u4e2d\u95f4\u8df3\uff09\uff1a<\/h3>\n<pre><code class=\"language-bash\">en\nconf t\nint fa0\/0\n ip add 192.168.40.2 255.255.255.0\nint fa0\/1\n ip add 23.0.0.1 255.255.255.0\nno shut\n! \u9759\u6001\u8def\u7531\uff1a\u544a\u8bc9R1\u53bb\u5185\u7f51\u548c\u53bb\u670d\u52a1\u5668\u600e\u4e48\u8d70\nip route 192.168.10.0 255.255.255.0 192.168.40.1\nip route 192.168.20.0 255.255.255.0 192.168.40.1\nip route 200.0.0.0 255.255.255.0 23.0.0.2\n\n<\/code><\/pre>\n<h3>R2 \u914d\u7f6e\uff08\u51fa\u53e3\u7aef\uff09\uff1a<\/h3>\n<pre><code class=\"language-bash\">en\nconf t\nhostname R3\nint fa0\/1\n ip add 23.0.0.2 255.255.255.0\nint fa0\/0\n ip add 200.0.0.254 255.255.255.0\nint loopback 0      ! \u914d\u7f6eLoopback\u63a5\u53e3\n ip add 3.3.3.3 255.255.255.0\nno shut\n! \u9ed8\u8ba4\u8def\u7531\u6307\u5411 R1\nip route 0.0.0.0 0.0.0.0 23.0.0.1\n\n<\/code><\/pre>\n<hr>\n<h2>\u9636\u6bb5\u4e94\uff1a\u5b89\u5168\u7b56\u7565\u4e0e\u670d\u52a1\uff08ACL\uff09<\/h2>\n<p>\u4efb\u52a1\uff1a\u5f00\u542f Web \u670d\u52a1\uff0c\u5e76\u9650\u5236 PC0 \u8bbf\u95ee\u3002<\/p>\n<h3>1. Web \u670d\u52a1\u5668\u914d\u7f6e<\/h3>\n<ul>\n<li>\u70b9\u51fb <strong>Web \u670d\u52a1\u5668<\/strong> -&gt; <strong>Services<\/strong> -&gt; <strong>DNS<\/strong>\uff1a\u5f00\u542f DNS\uff0c\u6dfb\u52a0 <code>www.abc.com<\/code> \u5bf9\u5e94 <code>200.0.0.1<\/code>\u3002<\/li>\n<li><strong>HTTP<\/strong>\uff1a\u786e\u4fdd\u4e3a On\u3002<\/li>\n<\/ul>\n<h3>2. \u5728 Sw1 \u4e0a\u5e94\u7528 ACL\uff08\u7cbe\u51c6\u62e6\u622a\uff09<\/h3>\n<pre><code class=\"language-bash\">en\nconf t\n! \u521b\u5efa ACL\uff1a\u62d2\u7edd PC0 \u8bbf\u95ee\u4efb\u4f55\u4e3b\u673a\u7684 HTTP(80) \u548c HTTPS(443)\naccess-list 101 deny tcp host 192.168.10.1 any eq 80\naccess-list 101 deny tcp host 192.168.10.1 any eq 443\naccess-list 101 permit ip any any    ! \u5141\u8bb8\u5176\u4ed6\u6240\u6709\u6d41\u91cf\uff08\u5305\u62ecPC1\u548cPing\uff09\n\n! \u5e94\u7528\u5230 PC0 \u8fdb\u5165\u7684\u7f51\u5173\u63a5\u53e3\nint vlan 10\n ip access-group 101 in\n\n<\/code><\/pre>\n<hr>\n<h2>\u9636\u6bb5\u516d\uff1a\u6700\u7ec8\u9a8c\u8bc1\u6e05\u5355<\/h2>\n<ol>\n<li><strong>\u5168\u7f51\u901a\u6d4b\u8bd5<\/strong>\uff1aPC1 \u5e94\u8be5\u80fd Ping \u901a R3 \u7684 Loopback \u63a5\u53e3 (3.3.3.3) \u548c Web \u670d\u52a1\u5668 (200.0.0.1)\u3002<\/li>\n<li><strong>DNS \u6d4b\u8bd5<\/strong>\uff1aPC1 \u7684\u6d4f\u89c8\u5668\u8f93\u5165 <code>www.abc.com<\/code> \u5e94\u5f53\u80fd\u770b\u5230 Cisco \u6b22\u8fce\u9875\u9762\u3002<\/li>\n<li><strong>\u5b89\u5168\u6d4b\u8bd5<\/strong>\uff1aPC0 \u8bbf\u95ee <code>www.abc.com<\/code> \u5e94\u5f53<strong>\u8d85\u65f6\u5931\u8d25<\/strong>\uff0c\u4f46 PC0 \u4ecd\u7136\u80fd Ping \u901a\u670d\u52a1\u5668\uff08\u8bc1\u660e ACL \u53ea\u62e6\u622a\u4e86\u7f51\u9875\u6d41\u91cf\uff09\u3002<\/li>\n<li><strong>\u8fdc\u7a0b\u767b\u5f55<\/strong>\uff1a\u5728 PC1 \u7684\u547d\u4ee4\u884c\u8f93\u5165 <code>telnet 192.168.10.254<\/code>\uff0c\u8f93\u5165\u5bc6\u7801 <code>cisco<\/code> \u5373\u53ef\u767b\u5f55 R3\u3002<\/li>\n<\/ol>\n<\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-9a5fb826-860a-4af5-a3b5-4336e3535b36\" href=\"https:\/\/www.axeuh.com\/wp-content\/uploads\/2025\/12\/\u4efb\u52a11.1-\u7ec4\u5efa\u5c0f\u578b\u5c40\u57df\u7f511.zip\">\u4efb\u52a11.1 \u7ec4\u5efa\u5c0f\u578b\u5c40\u57df\u7f511<\/a><a href=\"https:\/\/www.axeuh.com\/wp-content\/uploads\/2025\/12\/\u4efb\u52a11.1-\u7ec4\u5efa\u5c0f\u578b\u5c40\u57df\u7f511.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-9a5fb826-860a-4af5-a3b5-4336e3535b36\">\u4e0b\u8f7d<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16],"tags":[17],"class_list":["post-671","post","type-post","status-publish","format-standard","hentry","category-16","tag-17"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/posts\/671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/comments?post=671"}],"version-history":[{"count":4,"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/posts\/671\/revisions"}],"predecessor-version":[{"id":682,"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/posts\/671\/revisions\/682"}],"wp:attachment":[{"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/media?parent=671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/categories?post=671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.axeuh.com\/index.php\/wp-json\/wp\/v2\/tags?post=671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}