{"id":254,"date":"2022-07-21T16:03:36","date_gmt":"2022-07-21T08:03:36","guid":{"rendered":"http:\/\/danielw.top\/?p=254"},"modified":"2022-07-21T16:04:50","modified_gmt":"2022-07-21T08:04:50","slug":"%e5%8d%8e%e4%b8%ba%e4%ba%a4%e6%8d%a2%e6%9c%ba%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"http:\/\/danielw.top\/?p=254","title":{"rendered":"\u534e\u4e3a\u4ea4\u6362\u673a\u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"<h1>\u534e\u4e3a\u4ea4\u6362\u673a\u5e38\u7528\u547d\u4ee4<\/h1>\n<h2>\u89c6\u56fe\u5206\u7c7b<\/h2>\n<h3>\u7528\u6237\u89c6\u56fe<\/h3>\n<p>\u767b\u9646\u8bbe\u5907\u540e\uff0c\u76f4\u63a5\u8fdb\u5165\u7528\u6237\u6a21\u5f0f\uff0c\u53ea\u80fd\u6267\u884c\u5c11\u91cf\u67e5\u770b\u914d\u7f6e\u7684\u547d\u4ee4<\/p>\n<pre><code>Info: The max number of VTY users is 10, and the number\n      of current VTY users on line is 1.\n      The current login time is 2020-04-10 12:15:00+00:00.\n&lt;ZD_agg_5720&gt;<\/code><\/pre>\n<h3>\u7cfb\u7edf\u89c6\u56fe<\/h3>\n<p>\u7528\u6237\u6a21\u5f0f\u4e0b\uff0c\u8f93\u5165system-view\u547d\u4ee4\u8fdb\u5165\u89c6\u56fe\u6a21\u5f0f\uff0c\u53ef\u6267\u884c\u8bbe\u5907\u5168\u5c40\u914d\u7f6e\u7684\u547d\u4ee4<\/p>\n<pre><code>&lt;ZD_agg_5720&gt;system-view \nEnter system view, return user view with Ctrl+Z.\n[ZD_agg_5720]<\/code><\/pre>\n<h3>\u5c40\u90e8\u89c6\u56fe<\/h3>\n<p>\u7cfb\u7edf\u89c6\u56fe\u6a21\u5f0f\u4e0b\uff0c\u8f93\u5165\u5c40\u90e8\u914d\u7f6e\u547d\u4ee4\uff0c\u8fdb\u5165\u5c40\u90e8\u5bf9\u50cf\u7684\u914d\u7f6e\u89c6\u56fe\u3002\u5982interface GE 1\/0\/0\uff0c\u8fdb\u5165GE1\/0\/0\u7aef\u53e3\u914d\u7f6e\u6a21\u5f0f<\/p>\n<pre><code>&lt;ZD_agg_5720&gt;system-view \nEnter system view, return user view with Ctrl+Z.\n[ZD_agg_5720]interface GigabitEthernet 1\/0\/1\n[ZD_agg_5720-GigabitEthernet1\/0\/1]<\/code><\/pre>\n<h2>\u5e38\u7528\u547d\u4ee4<\/h2>\n<h3>\u547d\u4ee4\u7b80\u4ecb<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">\u547d\u4ee4<\/th>\n<th style=\"text-align: center;\">\u7f29\u5199<\/th>\n<th style=\"text-align: center;\">\u89e3\u91ca<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">display<\/td>\n<td style=\"text-align: center;\">dis<\/td>\n<td style=\"text-align: center;\">\u67e5\u770b\u76f8\u5e94\u5bf9\u8c61\u4fe1\u606f<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">undo<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u64a4\u6d88\u6216\u53cd\u5411\u64cd\u4f5c\u5bf9\u5e94\u547d\u4ee4<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">system-view<\/td>\n<td style=\"text-align: center;\">sy<\/td>\n<td style=\"text-align: center;\">\u8fdb\u5165\u7cfb\u7edf\u89c6\u56fe<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">sysname<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u8bbe\u7f6e\u4ea4\u6362\u673a\u540d\u79f0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">quit<\/td>\n<td style=\"text-align: center;\">q<\/td>\n<td style=\"text-align: center;\">\u9000\u51fa\u5f53\u524d\u89c6\u56fe<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">reboot<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u4ea4\u6362\u673a\u91cd\u542f<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">reset<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">restart<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u91cd\u65b0\u542f\u52a8\u5f53\u524d\u63a5\u53e3<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">shutdown<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u5173\u95ed\u5f53\u524d\u63a5\u53e3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4fe1\u606f\u67e5\u770b\u547d\u4ee4<\/h3>\n<h4>\u4ea4\u6362\u673a\u4fe1\u606f\u67e5\u770b<\/h4>\n<pre><code>display version  \u67e5\u770b\u4ea4\u6362\u673a\u8f6f\u4ef6\u7248\u672c\ndisplay clock    \u67e5\u770b\u4ea4\u6362\u673a\u65f6\u949f<\/code><\/pre>\n<h4>\u4ea4\u6362\u673a\u914d\u7f6e\u67e5\u770b<\/h4>\n<pre><code>display saved-configuration    \u663e\u793a\u7cfb\u7edf\u4fdd\u5b58\u914d\u7f6e\ndisplay current-configuration  \u663e\u793a\u7cfb\u7edf\u5f53\u524d\u914d\u7f6e<\/code><\/pre>\n<h4>\u5f53\u524d\u5bf9\u8c61\u4fe1\u606f\u67e5\u770b<\/h4>\n<pre><code>display this                    \u663e\u793a\u5f53\u524d\u4fe1\u606f\u3002\ndisplay this include-default    \u663e\u793a\u5f53\u524d\u63a5\u53e3\u89c6\u56fe\u4e0b\u7684\u63a5\u53e3\u4fe1\u606f\uff0c\u5305\u62ec\u9ed8\u8ba4\u503c\u3002\ndisplay this interface          \u663e\u793a\u5f53\u524d\u63a5\u53e3\u89c6\u56fe\u4e0b\u7684\u63a5\u53e3\u4fe1\u606f\u3002<\/code><\/pre>\n<h4>\u67e5\u770b\u63a5\u53e3<\/h4>\n<pre><code>display interface               \u67e5\u770b\u63a5\u53e3\u5f53\u524d\u8fd0\u884c\u72b6\u6001\u548c\u63a5\u53e3\u7edf\u8ba1\u4fe1\u606f\ndisplay interface brief         \u67e5\u770b\u63a5\u53e3\u72b6\u6001\u548c\u914d\u7f6e\u7684\u7b80\u8981\u4fe1\u606f\u3002\ndisplay interface description   \u67e5\u770b\u6307\u5b9a\u63a5\u53e3\u7684\u63cf\u8ff0\u4fe1\u606f\ndisplay interface vlanif        \u67e5\u770bVLANIF\u63a5\u53e3\u7684\u72b6\u6001\u4fe1\u606f\u3001\u914d\u7f6e\u4fe1\u606f\u548c\u7edf\u8ba1\u4fe1\u606f\u3002<\/code><\/pre>\n<h4>\u67e5\u770bIP\u76f8\u5173<\/h4>\n<pre><code>display ip interface             \u67e5\u770b\u63a5\u53e3\u4e0eIP\u76f8\u5173\u7684\u914d\u7f6e\u548c\u7edf\u8ba1\u4fe1\u606f\uff0c\u5305\u62ec\u63a5\u53e3\u63a5\u6536\u548c\u53d1\u9001\u7684\u62a5\u6587\u6570\u3001\u5b57\u8282\u6570\u548c\u7ec4\u64ad\u62a5\u6587\u6570\uff0c\u4ee5\u53ca\u63a5\u53e3\u63a5\u6536\u3001\u53d1\u9001\u3001\u8f6c\u53d1\u548c\u4e22\u5f03\u7684\u5e7f\u64ad\u62a5\u6587\u6570\u3002\ndisplay ip interface brief       \u770b\u63a5\u53e3\u4e0eIP\u76f8\u5173\u7684\u7b80\u8981\u4fe1\u606f\uff0c\u5305\u62ecIP\u5730\u5740\u3001\u5b50\u7f51\u63a9\u7801\u3001\u7269\u7406\u94fe\u8def\u548c\u534f\u8bae\u7684Up\/Down\u72b6\u6001\u4ee5\u53ca\u5904\u4e8e\u4e0d\u540c\u72b6\u6001\u7684\u63a5\u53e3\u6570\u76ee\u3002\ndisplay ip interface description \u67e5\u770b\u63a5\u53e3\u4e0eIP\u76f8\u5173\u7684\u7b80\u8981\u4fe1\u606f\uff0c\u5305\u62ecIP\u5730\u5740\u3001\u5b50\u7f51\u63a9\u7801\u3001\u7269\u7406\u5c42\u72b6\u6001\u3001\u94fe\u8def\u5c42\u534f\u8bae\u72b6\u6001\uff0c\u53ca\u63a5\u53e3\u63cf\u8ff0\u4fe1\u606f\u548c\u5904\u4e8e\u4e0d\u540c\u72b6\u6001\u7684\u63a5\u53e3\u6570\u76ee\u3002\ndisplay ip pool                                                          \u663e\u793a\u6240\u6709ip pool\ndisplay ip pool name {pool name} {all|conflict|expired|used}             \u663e\u793aip pool\u8be6\u7ec6\u4fe1\u606f\ndisplay ip host                \u67e5\u770b\u9759\u6001DNS\u8868\u9879\ndisplay ip socket              \u67e5\u770b\u5df2\u521b\u5efa\u7684IPv4 Socket\u4fe1\u606f\u3002\ndisplay ip statistics          \u663e\u793aIP\u6d41\u91cf\u7edf\u8ba1\u4fe1\u606f\u3002<\/code><\/pre>\n<h4>\u67e5\u770b\u8def\u7531<\/h4>\n<pre><code>display ip routing-table        \u663e\u793a\u8def\u7531\u4fe1\u606f\ndisplay ospf peer               \u67e5\u770bospf\u90bb\u63a5\u7b49\u4fe1\u606f\ndisplay ospf peer brief         \u67e5\u770bospf\u90bb\u63a5\u7b49\u7b80\u8981\u4fe1\u606f\ndisplay rip                     \u67e5\u770brip\u8def\u7531\u4fe1\u606f<\/code><\/pre>\n<h4>\u7f51\u7edc\u53ca\u6d41\u91cf<\/h4>\n<pre><code>display network status { all|tcp|udp|port port-number }   \u663e\u793aIP\u6d41\u91cf\u7edf\u8ba1\u4fe1\u606f \ndisplay tcp statistics   \u67e5\u770bTCP\u6d41\u91cf\u7edf\u8ba1\u4fe1\u606f\ndisplay udp statistics   \u67e5\u770bUDP\u6d41\u91cf\u7edf\u8ba1\u4fe1\u606f<\/code><\/pre>\n<h4>VLAN\u67e5\u770b<\/h4>\n<pre><code>display vlan                              \u663e\u793aVLAN\u4fe1\u606f\ndisplay vlan {pvid} verbose               \u67e5\u770bvlan\u7684\u8be6\u7ec6\u4fe1\u606f\ndisplay port vlan                         \u67e5\u770bVLAN\u4e2d\u5305\u542b\u7684\u63a5\u53e3\u4fe1\u606f\ndisplay sub-vlan                          \u67e5\u770bSub-VLAN\u7c7b\u578b\u7684VLAN\u8868\u9879\u4fe1\u606f\ndisplay super-vlan                        \u67e5\u770bSuper-VLAN\u7c7b\u578b\u7684VLAN\u8868\u9879\u4fe1\u606f\ndisplay mac-vlan mac-address all          \u67e5\u770b\u6240\u6709MAC\u5730\u5740\u5212\u5206VLAN\u7684\u914d\u7f6e\u4fe1\u606f\ndisplay mac-vlan vlan 2                   \u67e5\u770bvlan 2 MAC\u5730\u5740\u5212\u5206VLAN\u7684\u914d\u7f6e\u4fe1\u606f<\/code><\/pre>\n<h4>\u67e5\u770bACL\u914d\u7f6e<\/h4>\n<pre><code>display acl {all | name | ipv6}                         \u67e5\u770bACL\ndisplay traffic classifier user-defined                 \u67e5\u770b\u7528\u6237\u5b9a\u4e49\u7684\u6d41\u5206\u7c7b\ndisplay traffic behavior user-defined                   \u67e5\u770b\u7528\u6237\u5b9a\u4e49\u7684\u6d41\u884c\u4e3a\ndisplay traffic policy user-defined {policy name}       \u67e5\u770b\u7528\u6237\u5b9a\u4e49\u7684\u6d41\u7b56\u7565\ndisplay traffic-applied {inbound | outbound | interface | vlan}  \u67e5\u770b\u6d41\u7b56\u7565\u5e94\u7528\u60c5\u51b5\n\ndisplay traffic policy {global | interface | statistics | vlan } {inbound | outbound}   \u67e5\u770b\u66f4\u591a\u6d41\u7b56\u7565\u4fe1\u606f\ndisplay traffic policy statistics {global | interface | vlan} {inbound | outbound}      \u67e5\u770b\u6d41\u7b56\u7565\u7edf\u8ba1\u4fe1\u606f\n\ndisplay traffic-filter applied-record                   \u67e5\u770bacl\u5e94\u7528\u7684\u63a5\u53e3<\/code><\/pre>\n<h4>\u67e5\u770bNAT\u914d\u7f6e<\/h4>\n<pre><code>#\u8def\u7531\u5668\u547d\u4ee4\ndisplay nat static {acl | global | inside | interface}         \u67e5\u770b\u9759\u6001NAT\u4fe1\u606f\ndisplay nat session {all | dest | number | protocol | source}  \u67e5\u770b\u52a8\u6001NAT\u4fe1\u606f\ndisplay nat server {acl | global | inside | interface}         \u67e5\u770bNAT server\u4fe1\u606f<\/code><\/pre>\n<h3>\u914d\u7f6e\u7ba1\u7406\u547d\u4ee4<\/h3>\n<h4>\u7aef\u53e3\u7ba1\u7406<\/h4>\n<pre><code>port                                               \u914d\u7f6e\u63a5\u53e3\u7684\u7f3a\u7701VLAN\u5e76\u52a0\u5165\u8be5VLAN\nport description                                   \u914d\u7f6e\u63a5\u53e3\u7684\u63cf\u8ff0\u4fe1\u606f\uff0c\u63cf\u8ff0\u4e0e\u63a5\u53e3\u76f8\u8fde\u7684\u8bbe\u5907\u7c7b\u578b\u3002\nport gigabitethernet 0\/0\/1 to 0\/0\/4\nport default vlan                                  \u914d\u7f6e\u63a5\u53e3\u7684\u7f3a\u7701VLAN\u5e76\u540c\u65f6\u52a0\u5165\u8fd9\u4e2aVLAN\u3002\nport link-type {access | hybird | trunk}           \u914d\u7f6e\u63a5\u53e3\u7684\u94fe\u8def\u7c7b\u578b\nport trunk allow-pass vlan {vlanid}                \u5c06trunk\u63a5\u53e3\u52a0\u5165vlan<\/code><\/pre>\n<h4>\u7aef\u53e3\u914d\u7f6e<\/h4>\n<pre><code>speed  {10|100|auto}                             \u914d\u7f6e\u7aef\u53e3\u5de5\u4f5c\u901f\u7387\nduplex {half|full|auto}                          \u914d\u7f6e\u7aef\u53e3\u5de5\u4f5c\u72b6\u6001<\/code><\/pre>\n<h4>\u7aef\u53e3\u7ec4\u64cd\u4f5c<\/h4>\n<pre><code>display port-group  {all}                                     \u67e5\u770b\u7aef\u53e3\u7ec4\nport-group {id}                                               \u521b\u5efa\u7aef\u53e3\u7ec4\ngroup-member gigabitethernet 0\/0\/2 to gigabitethernet 0\/0\/10  \u5c062\u523010\u7aef\u53e3\u52a0\u5165\u7aef\u53e3\u7ec4<\/code><\/pre>\n<h4>VLAN\u7ba1\u7406<\/h4>\n<pre><code>vlan {id}                      \u521b\u5efaVLAN\u5e76\u8fdb\u5165VLAN\u89c6\u56fe\uff0c\u5982\u679cVLAN\u5df2\u5b58\u5728\uff0c\u76f4\u63a5\u8fdb\u5165\u8be5VLAN\u7684\u89c6\u56fe\u3002\nvlan batch 10 to 20            \u6279\u91cf\u521b\u5efaVLAN\nvlan range 10 to 20            \u521b\u5efa\u4e34\u65f6VLAN\u7ec4\uff0c\u5e76\u8fdb\u5165VLAN-Range\u89c6\u56fe\nvlan statistics                \u914d\u7f6eVLAN\u7684\u6d41\u91cf\u7edf\u8ba1\u6a21\u5f0f\uff0c\u5373\u914d\u7f6e\u6309\u5305\u6216\u6309\u5b57\u8282\u8fdb\u884cVLAN\u6d41\u91cf\u7edf\u8ba1\u3002\nvlan statistics interval       \u914d\u7f6eVLAN\u7684\u6d41\u91cf\u7edf\u8ba1\u7684\u65f6\u95f4\u95f4\u9694\nip address                     \u7528\u6765\u914d\u7f6e\u63a5\u53e3\u7684IP\u5730\u5740\u3002 <\/code><\/pre>\n<h4>\u63a5\u53e3\u7ba1\u7406<\/h4>\n<pre><code>interface gigabitethernet 0\/0\/1     \u8fdb\u5165\u6307\u5b9a\u7684\u63a5\u53e3\u6216\u5b50\u63a5\u53e3\u89c6\u56fe\uff0c\u8fdb\u51650\/0\/1\u7684\u63a5\u53e3<\/code><\/pre>\n<h4>DNS\u7ba1\u7406<\/h4>\n<pre><code>#\u67e5\u770b\ndisplay dns dynamic-host       \u67e5\u770b\u52a8\u6001DNS\u8868\u9879\ndisplay dns domain             \u67e5\u770b\u57df\u540d\u540e\u7f00\u7684\u76f8\u5173\u4fe1\u606f\ndisplay dns server             \u67e5\u770bDNS\u670d\u52a1\u5668\u7684\u76f8\u5173\u4fe1\u606f\n#\u8bbe\u7f6e\ndns domain domain-name    \u547d\u4ee4\u7528\u6765\u914d\u7f6e\u57df\u540d\u540e\u7f00\uff0c\u5982 dns domain com.cn\u3002\ndns resolve               \u547d\u4ee4\u7528\u6765\u4f7f\u80fd\u52a8\u6001\u57df\u540d\u89e3\u6790\u529f\u80fd\ndns server {ip}           \u547d\u4ee4\u7528\u6765\u914d\u7f6eDNS\u670d\u52a1\u5668\u7684IP\u5730\u5740\nip host {domain} {ip}     \u547d\u4ee4\u7528\u6765\u914d\u7f6e\u9759\u6001DNS\u8868\u9879 ip host www.huawei.com 10.10.10.4\u3002<\/code><\/pre>\n<h4>DHCP\u7ba1\u7406<\/h4>\n<pre><code>dhcp enable                          \u547d\u4ee4\u7528\u6765\u5f00\u542fDHCP\u529f\u80fd\u3002 \ndhcp select global                   \u4ece\u5168\u5c40\u914d\u7f6e\u4e2d\u83b7\u53d6dhcp\u914d\u7f6e<\/code><\/pre>\n<h4>ACL\u7ba1\u7406<\/h4>\n<pre><code>acl {name | number | ipv6}                     \u521b\u5efaacl\nrule [{ruleid}] permit ip source {\u6e90ip} {\u53cd\u63a9\u7801} [ destination {\u6e90ip} {\u53cd\u63a9\u7801} ]  \u521b\u5efa\u5141\u8bb8\u89c4\u5219\nrule [{ruleid}] deny ip source {\u6e90ip} {\u53cd\u63a9\u7801} [ destination {\u6e90ip} {\u53cd\u63a9\u7801}  ]   \u521b\u5efa\u62d2\u7edd\u89c4\u5219\n\ntraffic-filter {inbound | outbound} acl {acl number}              \u5728\u63a5\u53e3\u4e0a\u5e94\u7528acl\u89c4\u5219\n\n#\u521b\u5efa\u6d41\u5206\u7c7b\ntraffic classifier {classifier name} operator { and |or }\nif-match acl {acl number}                     \u4e3a\u6d41\u5206\u7c7b\u8bbe\u7f6e\u5339\u914d\u89c4\u5219\n#\u521b\u5efa\u6d41\u884c\u4e3a\ntraffic behavior {behavior name}                      \npermit | deny | redirect                      \u4e3a\u6d41\u884c\u4e3a\u914d\u7f6e\u52a8\u4f5c\n#\u521b\u5efa\u6d41\u7b56\u7565\ntraffic policy {policy name}        \nclassifier {classifier name} behavior {behavior name}             \u5173\u8054\u6d41\u5206\u7c7b\u4e0e\u6d41\u884c\u4e3a\n#\u5c06\u6d41\u7b56\u7565\u5e94\u7528\u5230\u63a5\u53e3\ninterface g0\/0\/1\ntraffic-policy {policy name}  {inbound | outbound}                 \u63a5\u53e3\u7ed1\u5b9a\u6d41\u7b56\u7565<\/code><\/pre>\n<h4>NAT\u7ba1\u7406<\/h4>\n<pre><code>#\u8fb9\u754c\u8def\u7531\u5668\u63a5\u53e3\u4e0a\u914d\u7f6e\u9759\u6001NAT\nnat static global {\u5916\u90e8ip} inside {\u5185\u90e8ip}                 \u6dfb\u52a0\u9759\u6001nat\uff0c\u5185\u5916\u90e8ip\u4e00\u5bf9\u4e00\n#\u52a8\u6001NAT\uff0c\u4f7f\u7528dis nat session\u67e5\u770b\nnat address-group {groupid} {ip\u5f00\u59cb} {ip\u7ed3\u675f}                     \u6dfb\u52a0\u5916\u90e8\u53ef\u7528\u5730\u5740\u6c60\nnat outbound {acl id} address-group {address-group id} no-pat    \u6dfb\u52a0\u52a8\u6001\u5730\u5740\u8f6c\u6362\n#NAPT\uff0c\u4f7f\u7528dis nat session\u67e5\u770b\nnat outbound {acl id} [address-group {address-group id}]         \u6dfb\u52a0\u52a8\u6001\u7aef\u53e3\u5730\u5740\u8f6c\u6362\n#NAT server\uff0c\u4f7f\u7528dis nat server\u67e5\u770b\nnat server protocol tcp global {\u5916\u90e8ip} {\u5916\u90e8\u7aef\u53e3} inside {\u5185\u90e8ip} {\u5185\u90e8\u7aef\u53e3}   \u6dfb\u52a0nat server\u8f6c\u6362<\/code><\/pre>\n<h4>\u7528\u6237\u7ba1\u7406<\/h4>\n<pre><code>#\u67e5\u770b\u672c\u5730\u7528\u6237\ndisplay local-user\n#\u67e5\u770b\u7528\u6237\u63a5\u53e3\ndisplay user-interface\n#\u8bbe\u7f6e\u7528\u6237vty0\u4e3a4\u4e2a\u5e76\u53d1\nuser-interface vty 0 4\n#\u8fdb\u5165\u7528\u6237console0\u63a5\u53e3\nuser-interface console 0\n#\u7528\u6237\u7ba1\u7406\nlocal-user {username} password cipher {password}\nlocal-user {username} level 15\nlocal-user {username} service-type telnet terminal ssh<\/code><\/pre>\n<h4>\u7ed1\u5b9aIP\u4e0eMAC<\/h4>\n<pre><code>user-bind ip-address 10.0.0.2 mac-address 0001-0203-0405\nuser privilege level 3<\/code><\/pre>\n<ul>\n<li>LEVEL 0(\u8bbf\u95ee\u7ea7)\uff1a\u53ef\u4ee5\u6267\u884c\u7528\u4e8e\u7f51\u7edc\u8bca\u65ad\u7b49\u529f\u80fd\u7684\u547d\u4ee4\u3002\u5305\u62ecping\u3001tracert\u3001telnet\u7b49\u547d\u4ee4\uff0c\u6267\u884c\u8be5\u7ea7\u522b\u547d\u4ee4\u7684\u7ed3\u679c\u4e0d\u80fd\u88ab\u4fdd\u5b58\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002<\/li>\n<li>LEVEL 1(\u76d1\u63a7\u7ea7)\uff1a\u53ef\u4ee5\u6267\u884c\u7528\u4e8e\u7cfb\u7edf\u7ef4\u62a4\u3001\u4e1a\u52a1\u6545\u969c\u8bca\u65ad\u7b49\u529f\u80fd\u7684\u547d\u4ee4\u3002\u5305\u62ecdebugging\u3001terminal\u7b49\u547d\u4ee4\uff0c\u6267\u884c\u8be5\u7ea7\u522b\u547d\u4ee4\u7684\u7ed3\u679c\u4e0d\u80fd\u88ab\u4fdd\u5b58\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002<\/li>\n<li>LEVEL 2(\u7cfb\u7edf\u7ea7)\uff1a\u53ef\u4ee5\u6267\u884c\u7528\u4e8e\u4e1a\u52a1\u914d\u7f6e\u7684\u547d\u4ee4\uff0c\u4e3b\u8981\u5305\u62ec\u8def\u7531\u7b49\u7f51\u7edc\u5c42\u6b21\u7684\u547d\u4ee4\uff0c\u7528\u4e8e\u5411\u7528\u6237\u63d0\u4f9b\u7f51\u7edc\u670d\u52a1\u3002<\/li>\n<li>LEVEL 3(\u7ba1\u7406\u7ea7)\uff1a\u6700\u9ad8\u7ea7\uff0c\u53ef\u4ee5\u8fd0\u884c\u6240\u6709\u547d\u4ee4\uff1a\u5173\u7cfb\u5230\u7cfb\u7edf\u7684\u57fa\u672c\u8fd0\u884c\u3001\u7cfb\u7edf\u652f\u6491\u6a21\u5757\u529f\u80fd\u7684\u547d\u4ee4\uff0c\u8fd9\u4e9b\u547d\u4ee4\u5bf9\u4e1a\u52a1\u63d0\u4f9b\u652f\u6491\u4f5c\u7528\u3002\u5305\u62ec\u6587\u4ef6\u7cfb\u7edf\u3001FTP\u3001TFTP\u3001XModem\u4e0b\u8f7d\u3001\u7528\u6237\u7ba1\u7406\u547d\u4ee4\u3001\u7ea7\u522b\u8bbe\u7f6e\u547d\u4ee4\u7b49\u3002<\/li>\n<\/ul>\n<h4>\u65e5\u5fd7\u4e0e\u7edf\u8ba1<\/h4>\n<pre><code>#\u6253\u5f00\u7edf\u8ba1\ndisplay counters               \u67e5\u770b\u63a5\u53e3\u7684\u6d41\u91cf\u7edf\u8ba1\u8ba1\u6570\nstatistic enable\ntrace mac enable\ntrace mac aa99-6600-5600 vlan 2<\/code><\/pre>\n<h4>\u5176\u5b83\u547d\u4ee4<\/h4>\n<pre><code>display stp                   \u663e\u793a\u751f\u6210\u6811\u4fe1\u606f\ndisplay mac-address           \u663e\u793aMAC\u5730\u5740\u8868\ndisplay bridge mac-address    \u67e5\u770b\u5f53\u524d\u6865\u63a5\u8bbe\u5907mac\u5730\u5740\ndisplay arp                   \u663e\u793aARP\u4fe1\u606f\u8868\ndisplay voice-vlan oui                          \u67e5\u770bVoice VLAN\u7684OUI\u53ca\u5176\u76f8\u5173\u5c5e\u6027\u3002\ndisplay voice-vlan status                       \u67e5\u770b\u5f53\u524dVoice VLAN\u7684\u76f8\u5173\u4fe1\u606f\n\nmac-vlan mac-address<\/code><\/pre>\n<h3>\u64cd\u4f5c\u5b9e\u6218<\/h3>\n<h4>VLAN\u64cd\u4f5c<\/h4>\n<pre><code>\u521b\u5efavlan\uff0c\u8bbe\u7f6evlan\u7684ip\uff0c\u5e76\u5c06\u7aef\u53e3\u52a0\u5165vlan\u4e2d\u3002\n\n#\u8fdb\u5165\u5168\u5c40\u914d\u7f6e\u89c6\u56fe\n&lt;Huawei&gt; system-view\n#\u65b0\u5efavlan2\n[Huawei] vlan 2\n#\u8fdb\u5165vlan2\u7684\u63a5\u53e3\u89c6\u56fe\n[Huawei] interface vlan 2\n#\u8bbe\u7f6evlan2\u7684\u4e09\u5c42\u7f51\u5173\u8def\u7531\n[Huawei-Vlanif2] ip address 10.0.0.1 255.255.255.0\n#\u8fdb\u51650\/0\/1\u63a5\u53e3\uff0c\u914d\u7f6e\u4e3aaccess\u63a5\u53e3\u5e76\u52a0\u5165vlan2\u4e2d\n[Huawei] interface GigabitEthernet 0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1] port link-type access\n[Huawei-GigabitEthernet0\/0\/1] port default vlan 2\n#\u8fdb\u51650\/0\/2\u63a5\u53e3\uff0c\u914d\u7f6e\u4e3atrunk\u63a5\u53e3\u5e76\u52a0\u5165vlan2\u4e2d\n[Huawei] interface GigabitEthernet 0\/0\/2\n[Huawei-GigabitEthernet0\/0\/2] port link-type trunk\n[Huawei-GigabitEthernet0\/0\/2] port trunk allow-pass vlan 2\n#\u67e5\u770b\u7aef\u53e3\u914d\u7f6e\u7684\u4fe1\u606f\n[Huawei-GigabitEthernet0\/0\/2] dis this\n#\u8fdb\u5165vlan2\uff0c\u5c060\/0\/2\u52300\/0\/5\u7aef\u53e3\u52a0\u5165\u5230vlan2\u4e2d\uff08port link-type\u9700\u8981\u662faccess\u7c7b\u578b\uff09\n[Huawei] vlan 2\n[Huawei-vlan2] port GigabitEthernet 0\/0\/2 to 0\/0\/5 <\/code><\/pre>\n<h4>\u7aef\u53e3\u7ec4\u64cd\u4f5c<\/h4>\n<pre><code>\u9700\u8981\u5bf9\u591a\u4e2a\u7aef\u53e3\u8fdb\u884c\u76f8\u540c\u64cd\u4f5c\u65f6\uff0c\u53ef\u4ee5\u521b\u5efa\u7aef\u53e3\u7ec4\u8fdb\u884c\u6279\u91cf\u64cd\u4f5c\u3002\n\n#\u521b\u5efa\u7aef\u53e3\u7ec41\uff0c\u8fdb\u884c\u6279\u91cf\u7aef\u53e3\u64cd\u4f5c\n[Huawei] port-group 1\n#\u5c066\u523010\u7aef\u53e3\u52a0\u5165\u7aef\u53e3\u7ec4\n[Huawei-port-group-1] group-member gigabitethernet 0\/0\/6 to gigabitethernet 0\/0\/10\n#\u6279\u91cf\u5c062~10\u7aef\u53e3\u4fee\u6539\u4e3aaccess\u6a21\u5f0f\n[Huawei-port-group-1] port link-type access\n#\u6279\u91cf\u5c066~10\u7aef\u53e3\u52a0\u5165\u5230vlan 2\u4e2d\n[Huawei-port-group-1] port default vlan 2<\/code><\/pre>\n<h4>IP POOL\u64cd\u4f5c<\/h4>\n<pre><code>&lt;Huawei&gt; system-view\n#\u8fdb\u5165ip pool\u4e2d\n[Huawei] ip pool vlan10\n#\u5728ip pool\u4e2d\u6dfb\u52a0dns server\n[Huawei-ip-pool-vlan10] dns-list 8.8.8.8\n#\u8bbe\u7f6e\u7f51\u5173\n[Huawei-ip-pool-vlan10] gateway-list 10.0.0.1\n#\u8bbe\u7f6eip pool\u7684ip\u6bb5\u548c\u6c60\uff0c\u9700\u8981\u4e0evlanif\u63a5\u53e3\u914d\u7f6e\u5339\u914d\uff0c\u5426\u5219ip\u5206\u914d\u4e0d\u4e86\n[Huawei-ip-pool-vlan10] network 10.0.0.0 mask 255.255.255.0\n#\u8fc7\u671f\u65f6\u95f4\n[Huawei-ip-pool-vlan10] lease day 10<\/code><\/pre>\n<h4>DHCP\u64cd\u4f5c<\/h4>\n<pre><code>&lt;Huawei&gt; system-view\n#\u5168\u5c40\u6253\u5f00DHCP\u670d\u52a1\n[Huawei] dhcp enable\n#\u8fdb\u5165vlan\u7684\u63a5\u53e3\u89c6\u56fe\n[Huawei] interface vlanif 2\n#\u8bbe\u7f6evlan2\u7684\u4e09\u5c42\u7f51\u5173\u8def\u7531\n[Huawei-Vlanif2] ip address 10.0.0.1 255.255.255.0\n#\u4ece\u5168\u5c40\u914d\u7f6e\u4e2d\u83b7\u53d6dhcp\u914d\u7f6e\n[Huawei-Vlanif2] dhcp select global<\/code><\/pre>\n<h4>\u9759\u6001\u6dfb\u52a0\u8def\u7531<\/h4>\n<pre><code>&lt;Huawei&gt; system-view\n&lt;Huawei&gt; display ip routing-table\n#ip route-static \u76ee\u7684ip  \u76ee\u6807\u5730\u5740\u63a9\u7801  \u4e0b\u4e00\u8df3ip\n[Huawei] ip route-static 10.0.1.0 255.255.255.0 10.0.0.1\n#\u5220\u9664\u8def\u7531\n[Huawei] undo ip route-static 10.0.1.0 255.255.255.0 10.0.0.1<\/code><\/pre>\n<h4>RIP\u8def\u7531\u7ba1\u7406<\/h4>\n<pre><code>&lt;Huawei&gt; system-view\n#\u4fee\u6539loopback0\u5730\u5740\n[Huawei] int LoopBack 0\n[Huawei-LoopBack0] ip address 1.1.1.1 0\n#\u521b\u5efarip\u8fdb\u7a0b\n[Huawei] rip 1\n#\u542f\u52a8\u7248\u672c2\n[Huawei-rip-1] version 2\n#\u5ba3\u544a\u7f51\u6bb5\n[Huawei] network 10.0.0.0\n[Huawei] network 1.0.0.0<\/code><\/pre>\n<h4>OSPF\u8def\u7531\u7ba1\u7406<\/h4>\n<pre><code>&lt;Huawei&gt; system-view\n#\u521b\u5efaospf\n[Huawei] ospf 1 router-id 1.1.1.1\n#\u521b\u5efaarea0\u533a\u57df\n[Huawei-ospf-1] area 0\n#\u52a0\u5165192.168.0.0\/24\u5b50\u7f51\n[Huawei-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255\n[Huawei-ospf-1-area-0.0.0.0]dis this\n#\n area 0.0.0.0\n  network 192.168.0.0 0.0.0.255\n#\n[Huawei-ospf-1-area-0.0.0.0]<\/code><\/pre>\n<h4>ACL\u7ba1\u7406<\/h4>\n<pre><code>&lt;Huawei&gt; system-view\n#\u914d\u7f6eacl\n[Huawei] acl 3000\n[Huawei-acl-adv-3000] rule permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255\n[Huawei-acl-adv-3000] rule permit ip source 192.168.2.0 0.0.0.255\n[Huawei-acl-adv-3000] quit\n#\u914d\u7f6e\u6d41\u5206\u7c7b\uff0c\u5339\u914dacl\n[Huawei] traffic classifier c0 operator or \n[Huawei-classifier-c0] if-match acl 3000\n[Huawei-classifier-c0] quit\n#\u914d\u7f6e\u6d41\u884c\u4e3a,\u8bbe\u7f6e\u52a8\u4f5c\n[Huawei-behavior-b0] traffic behavior b0\n[Huawei-behavior-b0] permit\n[Huawei-behavior-b0] quit\n#\u914d\u7f6e\u6d41\u7b56\u7565\uff0c\u5173\u8054\u6d41\u5206\u7c7bc0\u4e0e\u6d41\u884c\u4e3ab0\n[Huawei] traffic policy p0\n[Huawei-trafficpolicy-p1] classifier c0 behavior b0\n[Huawei-trafficpolicy-p1] quit\n#\u914d\u7f6e\u6d41\u7b56\u7565\u5e94\u7528\u5230\u63a5\u53e3\n[Huawei] interface  g0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1] traffic-policy p0 inbound\n[Huawei-GigabitEthernet0\/0\/1] return<\/code><\/pre>\n<h4>\u7528\u6237\u7ba1\u7406<\/h4>\n<pre><code>#\u67e5\u770b\u672c\u5730\u7528\u6237\n&lt;Huawei&gt; display local-user\n&lt;Huawei&gt; system-view\n#\u8fdb\u5165aaa\u914d\u7f6e\u6a21\u5f0f\n[Huawei] aaa\n#\u914d\u7f6e\u672c\u5730\u7528\u6237\u8d26\u53f7\u5bc6\u7801\n[Huawei-aaa] loca-user user1 password cipher 123456\n#\u7528\u6237\u670d\u52a1\u7c7b\u578b\u4e3atelnet\uff0c\u4f7f\u7528telnet\u767b\u9646\n[Huawei-aaa] local-user user1 service-type telnet\n#\u914d\u7f6e\u7528\u6237\u7279\u6743\u7b49\u7ea715\n[Huawei-aaa] local-user user1 privilege level 15<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u534e\u4e3a\u4ea4\u6362\u673a\u5e38\u7528\u547d\u4ee4 \u89c6\u56fe\u5206\u7c7b \u7528\u6237\u89c6\u56fe \u767b\u9646\u8bbe\u5907\u540e\uff0c\u76f4\u63a5\u8fdb\u5165\u7528\u6237\u6a21\u5f0f\uff0c\u53ea\u80fd\u6267\u884c\u5c11\u91cf\u67e5\u770b\u914d\u7f6e\u7684\u547d\u4ee4 Info: The max nu &#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254"}],"version-history":[{"count":2,"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":256,"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions\/256"}],"wp:attachment":[{"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}