{"id":161,"date":"2010-05-04T15:58:52","date_gmt":"2010-05-04T07:58:52","guid":{"rendered":"http:\/\/www.ipcpu.com\/?p=161"},"modified":"2010-05-04T15:58:52","modified_gmt":"2010-05-04T07:58:52","slug":"2-layer-switch-manage","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2010\/05\/2-layer-switch-manage\/","title":{"rendered":"\u4e8c\u5c42\u4ea4\u6362\u673a\u8fdc\u7a0b\u7f51\u7ba1"},"content":{"rendered":"

\u6709\u540c\u5b66\u95ee\u5230\u4e86\u4e8c\u5c42\u4ea4\u6362\u673a\u8fdc\u7a0b\u7f51\u7ba1\uff0c\u5148\u8bf4\u4e09\u5c42\u7684\u5427\uff0c\u4e09\u5c42\u7684\u6709IP\u5730\u5740\uff0c\u968f\u4fbf\u627e\u4e2aIP\u5730\u5740\u5c31\u80fd\u8fdb\u53bb\uff0c\u4f46\u662f\u89c4\u5212\u826f\u597d\u7684\u7f51\u7edc\u90fd\u662f\u6709\u5355\u72ec\u7684\u7f51\u7ba1IP\u7684\u3002\u5355\u72ec\u7684VLAN\u7528\u6765\u505a\u7f51\u7ba1\u3002<\/p>\n

\u8fd9\u4e5f\u5c31\u662f\u4e8c\u5c42\u4ea4\u6362\u673a\u8fdc\u7a0b\u7f51\u7ba1\u7684\u65b9\u6cd5\u3002\u8bbe\u7f6e\u4e00\u4e2a\u5355\u72ec\u7684VLAN\uff0c\u4f5c\u4e3a\u7ba1\u7406VLAN\uff0c\u9ed8\u8ba4\u662fVLAN1\uff0c\u53ef\u4ee5\u968f\u4fbf\u6539\u7684\u3002\u5982\u56fe\u6240\u793a\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f01\u4e1a\u5c0f\u7f51\u3002<\/p>\n

\"2sw\"<\/a><\/p>\n

<\/span>VLAN 10 IP\u5730\u5740\u6bb5192.168.10.0\/24<\/p>\n

VLAN 20 IP\u5730\u5740\u6bb5192.168.20.0\/24<\/p>\n

VLAN 30 IP\u5730\u5740\u6bb5192.168.30.0\/24\u3010\u7ba1\u7406VLAN\u3011<\/p>\n

\u5728\u4e8c\u5c42\u4ea4\u6362\u673a\u4e0a\u8bbe\u7f6eVLAN 30\u63a5\u53e3IP\u5730\u5740\uff0c\u5e76\u8bbe\u7f6e\u7f51\u5173\u5373\u53ef\u3002<\/p>\n

\u6d4b\u8bd5\u7ed3\u679c<\/p>\n

PC>ping 192.168.30.3<\/span><\/p>\n

Pinging 192.168.30.3 with 32 bytes of data:<\/span><\/p>\n

Request timed out.<\/span><\/p>\n

Request timed out.<\/span><\/p>\n

Reply from 192.168.30.3: bytes=32 time=94ms TTL=254<\/span><\/p>\n

Reply from 192.168.30.3: bytes=32 time=94ms TTL=254<\/span><\/p>\n

Ping statistics for 192.168.30.3:<\/span><\/p>\n

\u00a0Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),<\/span><\/p>\n

Approximate round trip times in milli-seconds:<\/span><\/p>\n

\u00a0Minimum = 94ms, Maximum = 94ms, Average = 94ms<\/span><\/p>\n

PC>telent 192.168.30.2<\/span><\/p>\n

Invalid Command.<\/span><\/p>\n

PC>telnet 192.168.30.2<\/span><\/p>\n

Trying 192.168.30.2 \u2026Open<\/span><\/p>\n

User Access Verification<\/span><\/p>\n

Password:<\/span><\/p>\n

\u6d4b\u8bd5\u6210\u529f\uff01<\/p>\n

\u5173\u952e\u4ee3\u7801\uff1a<\/p>\n

interface Vlan30<\/span><\/p>\n

ip address 192.168.30.2 255.255.255.0<\/span><\/p>\n

!<\/span><\/p>\n

ip default-gateway 192.168.30.1<\/span><\/p>\n

\u5982\u679c\u4e8c\u5c42\u4ea4\u6362\u673a\u4e0d\u8bbe\u7f6e\u7f51\u5173\uff0c\u90a3\u5c31\u5148telnet 192.168.30.1 \u5728telnet 192.168.30.2<\/p>\n

\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » \u4e8c\u5c42\u4ea4\u6362\u673a\u8fdc\u7a0b\u7f51\u7ba1<\/a><\/p>","protected":false},"excerpt":{"rendered":"

\u6709\u540c\u5b66\u95ee\u5230\u4e86\u4e8c\u5c42\u4ea4\u6362\u673a\u8fdc\u7a0b\u7f51\u7ba1\uff0c\u5148\u8bf4\u4e09\u5c42\u7684\u5427\uff0c\u4e09\u5c42\u7684\u6709IP\u5730\u5740\uff0c\u968f\u4fbf\u627e\u4e2aIP\u5730\u5740\u5c31\u80fd\u8fdb\u53bb\uff0c\u4f46\u662f\u89c4\u5212\u826f\u597d\u7684\u7f51\u7edc\u90fd\u662f\u6709\u5355\u72ec\u7684\u7f51\u7ba1IP\u7684\u3002\u5355\u72ec\u7684VLAN\u7528\u6765\u505a\u7f51\u7ba1\u3002 \u8fd9\u4e5f\u5c31\u662f\u4e8c\u5c42\u4ea4\u6362\u673a\u8fdc\u7a0b\u7f51\u7ba1\u7684\u65b9\u6cd5\u3002\u8bbe\u7f6e\u4e00\u4e2a\u5355\u72ec\u7684VLAN\uff0c\u4f5c\u4e3a\u7ba1\u7406VLAN\uff0c\u9ed8\u8ba4\u662fVLAN1\uff0c\u53ef\u4ee5\u968f\u4fbf\u6539\u7684\u3002\u5982\u56fe\u6240\u793a\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f01\u4e1a\u5c0f\u7f51\u3002 VLAN 10 IP\u5730\u5740\u6bb5192.168.10.0\/24 VLAN 20 IP\u5730\u5740\u6bb5192.168.20.0\/24 VLAN 30 IP\u5730\u5740\u6bb5192.168.30.0\/24\u3010\u7ba1\u7406VLAN\u3011 \u5728\u4e8c\u5c42\u4ea4\u6362\u673a\u4e0a\u8bbe\u7f6eVLAN 30\u63a5\u53e3IP\u5730\u5740\uff0c\u5e76\u8bbe\u7f6e\u7f51\u5173\u5373\u53ef\u3002 \u6d4b\u8bd5\u7ed3\u679c PC>ping 192.168.30.3 Pinging 192.168.30.3 with 32 bytes of data: Request timed out. Request timed out. Reply from 192.168.30.3: bytes=32 time=94ms TTL=254 Reply from 192.168.30.3: bytes=32 time=94ms TTL=254 Ping statistics for 192.168.30.3: \u00a0Packets: Sent = 4, Received = 2, Lost = 2 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/161"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":0,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}