{"id":2420,"date":"2022-09-05T13:56:53","date_gmt":"2022-09-05T05:56:53","guid":{"rendered":"https:\/\/www.wjxy.net.cn\/?p=2420"},"modified":"2023-10-04T06:31:35","modified_gmt":"2023-10-03T22:31:35","slug":"%e9%94%90%e6%8d%b7%e4%ba%a4%e6%8d%a2%e6%9c%ba%e5%bc%80%e5%b1%80%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.wjxy.net.cn\/?p=2420","title":{"rendered":"\u9510\u6377\u4ea4\u6362\u673a\u5f00\u5c40\u547d\u4ee4"},"content":{"rendered":"<h1>1\u3002\u9510\u6377\u4ea4\u6362\u673a\u5982\u4f55\u6062\u590d\u51fa\u5382<\/h1>\n<p>\u67e5\u770b\u5f53\u524d\u4ea4\u6362\u673a\u914d\u7f6e show running-config<\/p>\n<p>a\u3001\u901a\u8fc7telnet\u6216\u8005\u8d85\u7ea7\u7ec8\u7aef\u767b\u5f55\u8bbe\u5907\u547d\u4ee4\u884c\u3002<\/p>\n<p>b\u3001\u5728ruijie#\u6a21\u5f0f\u4e0b\uff0c\u8f93\u5165\u547d\u4ee4 <code>del config.text<\/code>\uff0c\u5728\u63d0\u793a\u662f\u5426\u786e\u8ba4\u5220\u9664\u6587\u4ef6\u65f6\uff0c\u8f93\u5165Y\u786e\u8ba4\u3002<\/p>\n<p>\u5220\u9664\u914d\u7f6e\u6587\u4ef6\u540e\uff0c\u5728ruijie#\u6a21\u5f0f\uff0c\u8f93\u5165reload\u547d\u4ee4\uff0c\u786e\u8ba4\u91cd\u542f\u65f6\uff0c\u8f93\u5165Y\uff0c\u8bbe\u5907\u91cd\u542f\u540e\uff0c\u6062\u590d\u5230\u51fa\u5382\u8bbe\u7f6e\u3002<\/p>\n<h1>2\u3002\u5f00\u542fHTTP\u8bbf\u95ee<\/h1>\n<p><code>enable<br \/>\nconfigure<br \/>\nenable service web-server<br \/>\ninterface vlan 1<br \/>\nip address 192.168.1.240 255.255.255.0<br \/>\nno shutdown<br \/>\nexit<br \/>\nenable secret level 15 0 123456aa<br \/>\nip http authentication local          \/\/\u8fd9\u4e00\u6b65\u5982\u679c\u663e\u793a\u9519\u8bef\u9700\u8981\u5347\u7ea7\u6700\u65b0\u56fa\u4ef6<br \/>\nusername admin password 123456aa<br \/>\nend<br \/>\nwrite<\/code><\/p>\n<h1>3.\u5f00\u542ftelnet ssh\u8bbf\u95ee\uff08WIN10\u52a0\u5bc6\u7801\u4e0d\u652f\u6301SSH\u8bbf\u95ee\uff0c\u53ef\u4ee5\u7528PUTTY\u6216\u8005LINUX ssh<\/h1>\n<p><code>configure terminal<br \/>\nenable service ssh-server<br \/>\ncrypto key generate dsa<br \/>\n512<br \/>\nline vty 0 4<br \/>\npassword 123456aa<br \/>\nlogin<br \/>\nend<br \/>\nwrite<\/code><\/p>\n<h1>4.\u5f00\u542fDHCP snooping<\/h1>\n<h3>\u5f00\u542f\u6838\u5fc3\u8bbe\u5907\u7684DHCP\u670d\u52a1\u529f\u80fd<\/h3>\n<p>Ruijie&gt;en<br \/>\nRuijie#config ter<br \/>\nRuijie(config)#service dhcp<\/p>\n<h3>\u521b\u5efa\u6838\u5fc3\u8bbe\u5907\u7684IP\u5730\u5740\uff0c\u5373\u7528\u6237\u7684\u7f51\u5173\u5730\u5740(\u4e0a\u9762\u914d\u597d\u8fd9\u91cc\u53ef\u4ee5\u4e0d\u914d\uff09<\/h3>\n<p>Ruijie(config)#interface vlan 1<br \/>\nRuijie(config-if-VLAN 1)#ip address 192.168.1.254 255.255.255.0<br \/>\nRuijie(config-if-VLAN 1)#exit<\/p>\n<h3>\u521b\u5efa\u6838\u5fc3\u8bbe\u5907\u7684DHCP\u5730\u5740\u6c60\uff08\u8fd9\u4e00\u6b65\u7528\u4e0d\u5230\u53ef\u4ee5\u4e0d\u914d\uff09<\/h3>\n<p>Ruijie(config)#ip dhcp pool vlan1<br \/>\nRuijie(dhcp-config)#network 192.168.1.0 255.255.255.0 &#8212;&#8212;&gt;\u5b50\u7f51\u63a9\u7801\u8981\u548c\u6240\u8bbe\u7f6eIP\u5730\u5740\u7684\u5b50\u7f51\u63a9\u7801\u4e00\u81f4\uff0c\u8fd9\u91cc\u90fd\u662f\/24\u4f4d\u63a9\u7801<br \/>\nRuijie(dhcp-config)#dns-server 218.85.157.99 &#8212;&#8212;&gt;\u8bbe\u7f6e\u5206\u914d\u7ed9\u5ba2\u6237\u7aef\u7684DNS\u5730\u5740<br \/>\nRuijie(dhcp-config)#default-router 192.168.1.254 &#8212;&#8212;&gt;\u8bbe\u7f6e\u5206\u914d\u7ed9\u7528\u6237\u7684\u7f51\u5173\u5730\u5740\uff0c\u8fd9\u4e2a\u8981\u548c\u6838\u5fc3\u8bbe\u5907\u4e0a\u6240\u8bbe\u7f6e\u7684IP\u5730\u5740\u4e00\u81f4\uff0c\u4e3a192.168.1.254<br \/>\nRuijie(dhcp-config)#end<br \/>\nRuijie#wr<\/p>\n<h3>\u5728\u63a5\u5165\u4ea4\u6362\u673a\u4e0a\u5f00\u542fdhcp snooping\u529f\u80fd<\/h3>\n<p>Ruijie&gt;enable<br \/>\nRuijie#configure terminal<br \/>\nRuijie(config)#ip dhcp snooping &#8212;&#8212;&gt;\u5f00\u542fDHCP snooping\u529f\u80fd<br \/>\n\u8fde\u63a5DHCP\u670d\u52a1\u5668\u7684\u63a5\u53e3\u914d\u7f6e\u4e3a\u53ef\u4fe1\u4efb\u53e3<br \/>\nRuijie(config)#interface gigabitEthernet 0\/49<br \/>\nRuijie(config-GigabitEthernet 0\/49)#ip dhcp snooping trust &#8212;&#8212;&#8211;\u5f00\u542fDHCP snooping\u7684\u4ea4\u6362\u673a\u6240\u6709\u63a5\u53e3\u7f3a\u7701\u4e3auntrust\u53e3\uff0c\u4ea4\u6362\u673a\u53ea\u8f6c\u53d1\u4ecetrust\u53e3\u6536\u5230\u7684DHCP\u54cd\u5e94\u62a5\u6587\uff08offer\u3001ACK\uff09<\/p>\n<h3>\u4fdd\u5b58\u914d\u7f6e<\/h3>\n<p>Ruijie(config-GigabitEthernet 0\/49)#end<br \/>\nRuijie#write &#8212;&#8212;&gt; \u786e\u8ba4\u914d\u7f6e\u6b63\u786e\uff0c\u4fdd\u5b58\u914d\u7f6e<\/p>\n<h1>5\u3002\u914d\u7f6eVLAN<\/h1>\n<p>vlan 10 &#8212;&#8212;&gt;\u521b\u5efaVLAN 10<br \/>\ninterface gigabitEthernet 0\/2<br \/>\nswitchport access vlan 10 &#8212;&#8212;&gt;\u5c06\u7aef\u53e3\u5206\u914d\u7ed9VLAN 10<br \/>\nexit<br \/>\ninterface gigabitEthernet 0\/1<br \/>\nswitchport mode trunk &#8212;&#8212;&gt; \u6307\u5b9a\u4e0a\u8fde\u6838\u5fc3\u4ea4\u6362\u673a\u7684trunk \u53e3<br \/>\nswitchport trunk allowed vlan add 1-4094 \uff08\u53ef\u9009\uff0c\u9ed8\u8ba4\u5df2\u653e\u901a\u6240\u6709vlan\uff09<\/p>\n<p>switchport trunk allowed vlan only 120\uff08\u53ea\u653e\u901avlan120\uff09<br \/>\nexit<\/p>\n<p>switchport trunk native vlan (1-4094_<br \/>\nNativeVlan\u5373PVID\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u6bcf\u4e2atruck\u53e3\u7684 PVID\u662f1<\/p>\n<p>int range g0\/1-24 \u540c\u65f6\u914d\u7f6e1-24\u53e3<\/p>\n<p>show run int g0\/1  \u67e5\u770b1\u53e3\u914d\u7f6e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3002\u9510\u6377\u4ea4\u6362\u673a\u5982\u4f55\u6062\u590d\u51fa\u5382 \u67e5\u770b\u5f53\u524d\u4ea4\u6362\u673a\u914d\u7f6e show running-config a\u3001\u901a\u8fc7telnet\u6216 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"_links":{"self":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/2420"}],"collection":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2420"}],"version-history":[{"count":10,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/2420\/revisions"}],"predecessor-version":[{"id":2437,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/2420\/revisions\/2437"}],"wp:attachment":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}