『壹』 VLAN閰嶇疆鐩稿叧鍛戒護浣跨敤鏁欑▼
鍦ㄤ氦鎹㈡満VLAN閰嶇疆涔嬪墠錛屾垜浠鍏堣佷簡瑙d竴涓嬪父鐢ㄧ殑閰嶇疆鍛戒護錛
鍒涘緩VLAN
system-view
vlan 10 //鍒涘緩vlan 10
灝嗙鍙e姞鍏ュ埌vlan涓
[Quidway] interface GigabitEthernet2/0/1
[Quidway- GigabitEthernet2/0/1] port link-type access //瀹氫箟絝鍙d紶杈撴ā寮
[Quidway- GigabitEthernet2/0/1] port default vlan 100 //灝嗙鍙e姞鍏vlan100
[Quidway- GigabitEthernet2/0/1] quit 鍥炲埌閰嶇疆瑙嗗浘
鍗庝負浜ゆ崲鏈哄皢澶氫釜絝鍙e姞鍏ュ埌涓涓猇LAN涓錛堟壒閲忔搷浣滐級
system-view
[Huawei]vlan 10
[Huawei-vlan10]q
[Huawei]port-group 1錛涘緩絝嬩竴涓緇
[Huawei-port-group-1]group-member GigabitEthernet0/0/1 to GigabitEthernet 0/0/10
[Huawei-port-group-1]port link-type access
[Huawei-port-group-1]port default vlan 10
絎2縐嶆柟娉曞氨鏄錛岀洿鎺ュ湪vlan涓嬮潰鍔犵鍙e嵆鍙錛屼絾鏄榪欑嶆柟娉曠殑鍩虹灝辨槸絝鍙fā寮忓繀欏繪槸access妯″紡錛岃屽崕涓虹殑浜ゆ崲鏈洪粯璁ゆ槸hybrid妯″紡
[Huawei]vlan 10
[Huawei-vlan10]port GigabitEthernet 0/0/1 to 0/0/5
褰撳崕涓轟氦鎹㈡満絝鍙d負access鏃訛紝鎵ц屽懡浠わ細
閰嶇疆TRUNK閾捐礬
[sw1]interface GigabitEthernet 0/0/24
[sw1-GigabitEthernet0/0/24]port link-type trunk 錛涢厤緗甌RUNK閾捐礬錛
[sw1-GigabitEthernet0/0/24]port trunk allow-pass vlan 10 20錛涘湪閾句腑涓婂厑璁竀LAN10 ,VLAN20閫氳繃錛屽敖閲忎笉瑕佷嬌鐢╬ort trunk allow-pass vlan all鍛戒護錛屽崕涓鴻懼囦笂錛宼runk鐨勪簩灞傞摼璺榛樿ゆ儏鍐典笅涓嶅厑璁鎬換浣晇lan閫氳繃錛岄櫎vlan1澶栥
鍒犻櫎鎺ュ彛鐨刅LAN淇℃伅錛
[sw1]interface GigabitEthernet 0/0/10
[sw1-GigabitEthernet0/0/10]undo port link-type
[sw1-GigabitEthernet0/0/10]undo port default vlan
[sw1-GigabitEthernet0/0/10]undo port trunk allow-pass vlan
鏄劇ず鎺ュ彛閰嶇疆淇℃伅
[sw1]interface GigabitEthernet 0/0/10
[sw1-GigabitEthernet0/0/10]display this
VLAN鎺ュ彛IP鍦板潃閰嶇疆
[Huawei]interface Vlanif100
[Huawei-Vlanif100]ip address 119.167.200.90 255.255.255.252
鍒犻櫎IP鍦板潃閰嶇疆錛
[R1-GigabitEthernet0/0/0.1]undo ip address
閰嶇疆榛樿ら潤鎬佽礬鐢憋細
[Quidway]ip route-static 0.0.0.0 0.0.0.0 119.167.200.89
浜ゆ崲鏈轟繚瀛樿劇疆鍜岄噸緗鍛戒護
save //淇濆瓨閰嶇疆淇℃伅
閲嶇疆浜ゆ崲鏈猴紙鎮㈠嶅嚭鍘傝劇疆錛夌殑閰嶇疆
reset saved-configuration /閲嶇疆浜ゆ崲鏈虹殑閰嶇疆錛岀劧鍚庨噸鍚璺鐢卞櫒鍗沖彲銆
閲嶆柊鍚鍔ㄤ氦鎹㈡満
reboot //閲嶆柊鍚鍔ㄤ氦鎹㈡満