‘壹’ 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 //閲嶆柊钖锷ㄤ氦鎹㈡満