您好,登錄后才能下訂單哦!
<Huawei>sys
[Huawei]sysname SW2
[SW2]vlan batch 10 20 ##創(chuàng)建vlan10 20
[SW2]int e0/0/2
[SW2-Ethernet0/0/2]port link-type access ##設(shè)置access
[SW2-Ethernet0/0/2]port default vlan 10 ##將接口放到vlan中
[SW2-Ethernet0/0/2]un sh
[SW2-Ethernet0/0/2]int e0/0/3
[SW2-Ethernet0/0/3]port link-type access
[SW2-Ethernet0/0/3]port default vlan 20
[SW2-Ethernet0/0/3]un sh
[SW2-Ethernet0/0/3]int e0/0/1
[SW2-Ethernet0/0/1]port link-type trunk ##設(shè)置trunk
[SW2-Ethernet0/0/1]port trunk allow-pass vlan all ##允許所有的vlan通過
[SW2-Ethernet0/0/1]un sh
[SW2-Ethernet0/0/1]int g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/1]un sh
<Huawei>sys
[Huawei]sysname SW3
[SW3]vlan batch 10 20
[SW3]int e0/0/2
[SW3-Ethernet0/0/2]port link-type access
[SW3-Ethernet0/0/2]port default vlan 10
[SW3-Ethernet0/0/2]un sh
[SW3-Ethernet0/0/2]int e0/0/3
[SW3-Ethernet0/0/3]port link-type access
[SW3-Ethernet0/0/3]port default vlan 20
[SW3-Ethernet0/0/3]un sh
[SW3-Ethernet0/0/3]int e0/0/1
[SW3-Ethernet0/0/1]port link-type trunk
[SW3-Ethernet0/0/1]port trunk allow-pass vlan all
[SW3-Ethernet0/0/1]un sh
<Huawei>sys
[Huawei]sysname SW1
[SW1]vlan batch 10 20 1000
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/1]un sh
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
##三層交換連接路由的不能配置trunk
[SW1-GigabitEthernet0/0/2]port default vlan 1000
[SW1-GigabitEthernet0/0/2]un sh
[SW1-GigabitEthernet0/0/2]q
[SW1]int vlanif 10 ##進入邏輯接口
[SW1-Vlanif10]ip add 192.168.10.1 24 ##設(shè)置網(wǎng)關(guān)
[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip add 192.168.20.1 24
[SW1]int vlanif 1000
[SW1-Vlanif1000]ip add 11.0.0.1 30
[SW1-Vlanif1000]q
[SW1]ip route-static 0.0.0.0 0.0.0.0 11.0.0.2 ##設(shè)置默認路由,向上默認,向下靜態(tài)
<Huawei>sys
[Huawei]sysname R1
[R1]int g0/0/0 ##設(shè)置接口的ip地址
[R1-GigabitEthernet0/0/0]ip add 11.0.0.2 30
[R1-GigabitEthernet0/0/0]un sh
[R1-GigabitEthernet0/0/0]int loopback 0 ##進入回環(huán)接口,設(shè)置ip
[R1-LoopBack0]ip add 1.1.1.1 30
[R1-LoopBack0]q
[R1]ip route-static 192.168.10.0 24 11.0.0.1 ##設(shè)置靜態(tài)路由
[R1]ip route-static 192.168.20.0 24 11.0.0.1
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。