溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

不同VLAN全網(wǎng)互通

發(fā)布時(shí)間:2020-05-26 04:57:18 來(lái)源:網(wǎng)絡(luò) 閱讀:2771 作者:俊鳳 欄目:系統(tǒng)運(yùn)維

1,實(shí)驗(yàn)名稱:不同VLAN全網(wǎng)互通

2,實(shí)驗(yàn)?zāi)康模号渲?a title="DNS" target="_blank" href="http://kemok4.com/dns/">DNS服務(wù)器實(shí)現(xiàn)全網(wǎng)互通

3,實(shí)驗(yàn)拓?fù)洌?/p>

不同VLAN全網(wǎng)互通

4,配置步驟:

SW3:

[SW3]vlan10

[SW3]vlan20

[SW3]interface Ethernet0/0/1

[SW3-Ethernet0/0/1]port link-type access

[SW3-Ethernet0/0/1]port default vlan 10

[SW3-Ethernet0/0/1]undo shutdown

[SW3-Ethernet0/0/1]interface Ethernet0/0/2

[SW3-Ethernet0/0/2]port link-type access

[SW3-Ethernet0/0/2]port default vlan 20

[SW3-Ethernet0/0/2]undo shutdown

[SW3-Ethernet0/0/2]interface Ethernet0/0/13

[SW3-Ethernet0/0/13]port link-type trunk

[SW3-Ethernet0/0/13]port trunk allow-pass vlan all

[SW3-Ethernet0/0/13]undo shutdown

[SW3-Ethernet0/0/13]interface Ethernet0/0/22

[SW3-Ethernet0/0/22]port link-type trunk

[SW3-Ethernet0/0/22]port trunk allow-pass vlan all

[SW3-Ethernet0/0/22]undo shutdown

[SW3]interface Ethernet 0/0/13

[SW3-Ethernet0/0/13]port link-type trunk

[SW3-Ethernet0/0/13]undo shutdown

[SW3-Ethernet0/0/13]interface Ethernet 0/0/22

[SW3-Ethernet0/0/22]port link-type trunk

[SW3-Ethernet0/0/22]undo shutdown

SW4:

[SW4]vlan10

[SW4]vlan20

[SW4]interface Ethernet0/0/3

[SW4-Ethernet0/0/3]port link-type access

[SW4-Ethernet0/0/3]port default vlan 10

[SW4-Ethernet0/0/3]undo shutdown

[SW4-Ethernet0/0/3]interface Ethernet0/0/22

[SW4-Ethernet0/0/22]port link-type trunk

[SW4-Ethernet0/0/22]port trunk allow-pass vlan all

[SW4-Ethernet0/0/22]undo shutdown

[SW4-Ethernet0/0/22]interface Ethernet0/0/14

[SW4-Ethernet0/0/14]port link-type trunk

[SW4-Ethernet0/0/14]port trunk allow-pass vlan all

SW5:

[SW5]vlan40

[SW5]interface Ethernet0/0/1

[SW5-Ethernet0/0/1]port link-type access

[SW5-Ethernet0/0/1]port default vlan 40

[SW5-Ethernet0/0/1]undo shutdown

[SW5-Ethernet0/0/1]interface Ethernet0/0/4

[SW5-Ethernet0/0/4]port link-type access

[SW5-Ethernet0/0/4]port default vlan 40

[SW5-Ethernet0/0/4]undo shutdown

[SW5-Ethernet0/0/4]interface Ethernet0/0/5

[SW5-Ethernet0/0/5]port link-type access

[SW5-Ethernet0/0/5]port default vlan 40

[SW5-Ethernet0/0/5]undo shutdown

[SW5-Ethernet0/0/5]interface Ethernet0/0/10

[SW5-Ethernet0/0/10]port link-type access

[SW5-Ethernet0/0/10]port default vlan 40

[SW5-Ethernet0/0/10]undo shutdown

SW1:

[Huawei]vlan 10

[Huawei-vlan10]vlan 20

[Huawei-vlan20]vlan 30

[Huawei]interface gi0/0/1

[Huawei-GigabitEthernet0/0/1]port link-type access

[Huawei-GigabitEthernet0/0/1]port default vlan 30

[Huawei-GigabitEthernet0/0/1]undo shutdown

[Huawei-GigabitEthernet0/0/1]interface gi0/0/12

[Huawei-GigabitEthernet0/0/12]port link-type access

[Huawei-GigabitEthernet0/0/12]port default vlan 30

[Huawei-GigabitEthernet0/0/12]port link-type trunk

[Huawei]interface vlan 10

[Huawei-Vlanif10]ip address 192.168.10.254 255.255.255.0

[Huawei-Vlanif10]undo shutdown

[Huawei-Vlanif10]interface vlan 20

[Huawei-Vlanif20]ip address 192.168.20.254 255.255.255.0

[Huawei-Vlanif20]undo shutdown

[Huawei-Vlanif20]interface vlan 30

[Huawei-Vlanif30]ip address 192.168.30.2 255.255.255.0

[Huawei-Vlanif30]undo shutdown

[Huawei]ip route-static 192.168.40.0 255.255.255.0 192.168.30.88

[Huawei]rip

[Huawei-rip-1]version 2

[Huawei-rip-1]network 192.168.30.0

[Huawei-rip-1]network 192.168.10.0

[Huawei-rip-1]network 192.168.20.0

[Huawei]interface gi0/0/2

[Huawei-GigabitEthernet0/0/2]port link-type trunk

[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[Huawei-GigabitEthernet0/0/2]undo shutdown

[Huawei]interface gi0/0/13

[Huawei-GigabitEthernet0/0/13]port link-type trunk

[Huawei-GigabitEthernet0/0/13]port trunk allow-pass vlan all

[Huawei-GigabitEthernet0/0/13]undo shutdown

[Huawei-GigabitEthernet0/0/13]interface gi0/0/14

[Huawei-GigabitEthernet0/0/14]port link-type trunk

[Huawei-GigabitEthernet0/0/14]port trunk allow-pass vlan all

[Huawei-GigabitEthernet0/0/14]undo shutdown

SW2:

[SW2]vlan 30

[SW2]interface gi 0/0/12

[SW2-GigabitEthernet0/0/12]port link-type access

[SW2-GigabitEthernet0/0/12]port default vlan 30

[SW2-GigabitEthernet0/0/12]undo shutdown

[SW2]interface vlan 30

[SW2-Vlanif30]ip address 192.168.30.88 255.255.255.0

[SW2-Vlanif30]undo shutdown

[SW2]interface gi0/0/10

[SW2-GigabitEthernet0/0/10]port link-type access

[SW2-GigabitEthernet0/0/10]port default vlan 40

[SW2-GigabitEthernet0/0/10]undo shutdown

[SW2]interface vlan 40

[SW2-Vlanif40]ip address 192.168.40.254 255.255.255.0

[SW2-Vlanif40]undo shutdown

[SW2]rip

[SW2-rip-1]version 2

[SW2-rip-1]network 192.168.40.0

[SW2-rip-1]network 192.168.30.0

[SW2]ip route-static 192.168.30.0 255.255.255.0 192.168.30.2



5,測(cè)試及驗(yàn)證:

不同VLAN全網(wǎng)互通

不同VLAN全網(wǎng)互通

不同VLAN全網(wǎng)互通

不同VLAN全網(wǎng)互通

6,總結(jié):

配置思路:

(1)配置PC機(jī)IP地址及網(wǎng)關(guān)

(2)配置交換機(jī)SW3,SW4創(chuàng)建VLAN 10 20,并將下方端口加入對(duì)應(yīng)的VLAN,交換機(jī)相連的端口做trunk鏈路

(3)SW1創(chuàng)建VLAN 10 20 30 ,配置VLAN 10 20 的網(wǎng)關(guān),下方端口trunk鏈路,VLAN30 配置IP地址

(4)SW2創(chuàng)建VLAN 30 40,配置VLAN30 40的網(wǎng)關(guān)

(5)SW5創(chuàng)建VLAN40 并將端口access加入VLAN 40

(6)SW1 SW2做RIP并進(jìn)行下一跳

(7)配置server1 作為DNS服務(wù)器

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI