{"id":2130,"date":"2017-04-25T17:55:22","date_gmt":"2017-04-25T09:55:22","guid":{"rendered":"http:\/\/cn.hostease.com\/xueyuan\/?p=2130"},"modified":"2024-11-15T11:27:57","modified_gmt":"2024-11-15T03:27:57","slug":"cisco%e4%ba%a4%e6%8d%a2%e6%9c%ba%e5%9f%ba%e6%9c%ac%e9%85%8d%e7%bd%ae%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/xueyuan\/jishu\/cisco%e4%ba%a4%e6%8d%a2%e6%9c%ba%e5%9f%ba%e6%9c%ac%e9%85%8d%e7%bd%ae%e5%91%bd%e4%bb%a4\/","title":{"rendered":"CISCO\u4ea4\u6362\u673a\u57fa\u672c\u914d\u7f6e\u547d\u4ee4"},"content":{"rendered":"<p>\u4ea4\u6362\u673a\u57fa\u672c\u72b6\u6001\uff1a<br \/>\nswitch: \uff1bROM\u72b6\u6001\uff0c \u8def\u7531\u5668\u662frommon&gt;<br \/>\nhostname&gt; \uff1b\u7528\u6237\u6a21\u5f0f<br \/>\nhostname# \uff1b\u7279\u6743\u6a21\u5f0f<br \/>\nhostname(config)# \uff1b\u5168\u5c40\u914d\u7f6e\u6a21\u5f0f<br \/>\nhostname(config-if)# \uff1b\u63a5\u53e3\u72b6\u6001<\/p>\n<p>\u4ea4\u6362\u673a\u53e3\u4ee4\u8bbe\u7f6e\uff1a<br \/>\nswitch&gt;enable \uff1b\u8fdb\u5165\u7279\u6743\u6a21\u5f0f<br \/>\nswitch#config terminal \uff1b\u8fdb\u5165\u5168\u5c40\u914d\u7f6e\u6a21\u5f0f<br \/>\nswitch(config)#hostname \uff1b\u8bbe\u7f6e\u4ea4\u6362\u673a\u7684\u4e3b\u673a\u540d<br \/>\nswitch(config)#enable secret xxx \uff1b\u8bbe\u7f6e\u7279\u6743\u52a0\u5bc6\u53e3\u4ee4<br \/>\nswitch(config)#enable password xxa \uff1b\u8bbe\u7f6e\u7279\u6743\u975e\u5bc6\u53e3\u4ee4<br \/>\nswitch(config)#line console 0 \uff1b\u8fdb\u5165\u63a7\u5236\u53f0\u53e3<br \/>\nswitch(config-line)#line vty 0 4 \uff1b\u8fdb\u5165\u865a\u62df\u7ec8\u7aef<br \/>\nswitch(config-line)#login \uff1b\u5141\u8bb8\u767b\u5f55<br \/>\nswitch(config-line)#password xx \uff1b\u8bbe\u7f6e\u767b\u5f55\u53e3\u4ee4xx<br \/>\nswitch#exit \uff1b\u8fd4\u56de\u547d\u4ee4<\/p>\n<p>\u4ea4\u6362\u673aVLAN\u8bbe\u7f6e\uff1a<br \/>\nswitch#vlan database \uff1b\u8fdb\u5165VLAN\u8bbe\u7f6e<br \/>\nswitch(vlan)#vlan 2 \uff1b\u5efaVLAN 2<br \/>\nswitch(vlan)#no vlan 2 \uff1b\u5220vlan 2<br \/>\nswitch(config)#int f0\/1 \uff1b\u8fdb\u5165\u7aef\u53e31<br \/>\nswitch(config-if)#switchport access vlan 2 \uff1b\u5f53\u524d\u7aef\u53e3\u52a0\u5165vlan 2<br \/>\nswitch(config-if)#switchport mode trunk \uff1b\u8bbe\u7f6e\u4e3a\u5e72\u7ebf<br \/>\nswitch(config-if)#switchport trunk allowed vlan 1\uff0c2 \uff1b\u8bbe\u7f6e\u5141\u8bb8\u7684vlan<br \/>\nswitch(config-if)#switchport trunk encap dot1q \uff1b\u8bbe\u7f6evlan \u4e2d\u7ee7<br \/>\nswitch(config)#vtp domain \uff1b\u8bbe\u7f6e\u53d1vtp\u57df\u540d<br \/>\nswitch(config)#vtp password \uff1b\u8bbe\u7f6e\u53d1vtp\u5bc6\u7801<br \/>\nswitch(config)#vtp mode server \uff1b\u8bbe\u7f6e\u53d1vtp\u6a21\u5f0f<br \/>\nswitch(config)#vtp mode client \uff1b\u8bbe\u7f6e\u53d1vtp\u6a21\u5f0f<\/p>\n<p>\u4ea4\u6362\u673a\u8bbe\u7f6eIP\u5730\u5740\uff1a<br \/>\nswitch(config)#interface vlan 1 \uff1b\u8fdb\u5165vlan 1<br \/>\nswitch(config-if)#ip address \uff1b\u8bbe\u7f6eIP\u5730\u5740<br \/>\nswitch(config)#ip default-gateway \uff1b\u8bbe\u7f6e\u9ed8\u8ba4\u7f51\u5173<br \/>\nswitch#dir flash: \uff1b\u67e5\u770b\u95ea\u5b58<\/p>\n<p>\u4ea4\u6362\u673a\u663e\u793a\u547d\u4ee4\uff1a<br \/>\nswitch#write \uff1b\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f<br \/>\nswitch#show vtp \uff1b\u67e5\u770bvtp\u914d\u7f6e\u4fe1\u606f<br \/>\nswitch#show run \uff1b\u67e5\u770b\u5f53\u524d\u914d\u7f6e\u4fe1\u606f<br \/>\nswitch#show vlan \uff1b\u67e5\u770bvlan\u914d\u7f6e\u4fe1\u606f<br \/>\nswitch#show interface \uff1b\u67e5\u770b\u7aef\u53e3\u4fe1\u606f<br \/>\nswitch#show int f0\/0 \uff1b\u67e5\u770b\u6307\u5b9a\u7aef\u53e3\u4fe1\u606f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ea4\u6362\u673a\u57fa\u672c\u72b6\u6001\uff1a switch: \uff1bROM\u72b6\u6001\uff0c \u8def\u7531\u5668\u662frommon&gt; hostname&gt; \uff1b\u7528 &#8230; <a title=\"CISCO\u4ea4\u6362\u673a\u57fa\u672c\u914d\u7f6e\u547d\u4ee4\" class=\"read-more\" href=\"https:\/\/cn.hostease.com\/xueyuan\/jishu\/cisco%e4%ba%a4%e6%8d%a2%e6%9c%ba%e5%9f%ba%e6%9c%ac%e9%85%8d%e7%bd%ae%e5%91%bd%e4%bb%a4\/\" aria-label=\"\u9605\u8bfb CISCO\u4ea4\u6362\u673a\u57fa\u672c\u914d\u7f6e\u547d\u4ee4\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[1466,771],"class_list":["post-2130","post","type-post","status-publish","format-standard","hentry","category-jishu","tag-cisco","tag-771"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/2130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/comments?post=2130"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/2130\/revisions"}],"predecessor-version":[{"id":2131,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/2130\/revisions\/2131"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/media?parent=2130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/categories?post=2130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/tags?post=2130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}