溫馨提示×

溫馨提示×

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

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

【網(wǎng)絡(luò)知識點(diǎn)】高級交換技術(shù)

發(fā)布時(shí)間:2020-07-30 05:20:42 來源:網(wǎng)絡(luò) 閱讀:685 作者:xierex 欄目:網(wǎng)絡(luò)安全

高級交換技術(shù)

本文將通過實(shí)驗(yàn)展示高級交換技術(shù)里面關(guān)鍵知識點(diǎn),主要以實(shí)際配置&關(guān)鍵注意點(diǎn)為主,其基礎(chǔ)概念不會(huì)作解釋。

 

實(shí)驗(yàn)環(huán)境:

GNS3,三層交換機(jī)使用C3640+交換接口模擬,二層交換機(jī)使用C3640+交換接口+關(guān)閉路由功能模擬,主機(jī)使用C7200+關(guān)閉路由功能模擬

【網(wǎng)絡(luò)知識點(diǎn)】高級交換技術(shù) 

包含技術(shù):

基礎(chǔ)交換技術(shù)

高級交換防環(huán):MSTP

高級交換冗余:網(wǎng)關(guān)冗余技術(shù)-HSRP

基礎(chǔ)路由技術(shù),OSPF基礎(chǔ)配置

 

最終實(shí)現(xiàn):

VLAN間能相互通信;VLAN10流量走R4-R2-R1主路線,備用路線R4-R3-R1VLAN20流量走R4/R5-R3-R1主路線,備用路線R4/R5-R2-R1,在鏈路故障時(shí)可以自動(dòng)切換備用路線;R2R3之間做鏈路冗余,并且做了主備網(wǎng)關(guān),R2vlan10的主網(wǎng)關(guān),vlan20的備網(wǎng)關(guān),R3相反。

VLAN10網(wǎng)段為192.168.10.X 網(wǎng)關(guān)為10.254  VLAN20網(wǎng)段為192.168.20.X  網(wǎng)關(guān)為20.254  VLAN30網(wǎng)段為192.168.30.X vlan30隔離,只內(nèi)部通信。

 

相關(guān)重點(diǎn)配置:

 

基礎(chǔ)交換技術(shù)的配置就忽略了,具體參考上一篇博文《基礎(chǔ)交換技術(shù)》

 

MSTP配置

在所有交換機(jī)配置

Config# spanning-tree  ---開啟STP功能,CISCO默認(rèn)開啟

Config# spanning-tree mode mst ---定義STP模式為MSTP

Config#spanning-tree mst configuration

Config-mst# name CISCO ---定義MSTP名字

Config-mst# instance 1 vlan 10     定義實(shí)例1

Config-mst# instance 2 vlan 20,30   定義實(shí)例2

 

R2config# spanning-tree mst 1 root primary  ---實(shí)例1為主

R2config# spanning-tree mst 2 root secondary ---實(shí)例2為備

 

R3config# spanning-tree mst 2 root primary --- 實(shí)例2為主

R3config# spanning-tree mst 1 root secondary --- 實(shí)例1為備

 

show spanning-tree mst //查看

 

 

路由配置

R1(config)#int f0/0

R1(config-if)#no switchport //交換端口變路由端口

R1(config-if)#ip add 10.1.12.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#exit

 

R1(config)#int f0/1

R1(config-if)#no switchport

R1(config-if)#ip address 10.1.13.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#exit

 

R1(config)#int l0  //配置環(huán)回口,模擬外網(wǎng)

R1(config-if)#ip add 1.1.1.1 255.255.255.255

R1(config-if)#no shu

R1(config-if)#exit

 

R2(config)#int f0/0

#no switchport

R2(config-if)#ip add 10.1.12.2 255.255.255.0

R2(config-if)#no shu

R2(config-if)#exit

 

R3(config)#int f0/0

#no switchport

R3(config-if)#ip address 10.1.13.3 255.255.255.0

R3(config-if)#no shu

R3(config-if)#exit

 

R1(config)#router ospf 1

R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 10.1.12.0 0.0.0.255 area 0

R1(config-router)#network 10.1.13.0 0.0.0.255 area 0

R1(config-router)#network 1.1.1.1 0.0.0.0 area 0

R1(config-router)#exit

R1(config)#

 

R2(config-router)#rou

R2(config-router)#router-id 2.2.2.2

R2(config-router)#network 10.1.12.0 0.0.0.255 area 0

R2(config-router)#network 192.168.10.0 0.0.0.255 area 0

R2(config-router)#exit

 

R3配置參考R2

 

HSRP配置

 

R2(config)#int vlan 10

R2(config-if)#ip address 192.168.10.253 255.255.255.0

R2(config-if)#standby 10 ip 192.168.10.254

R2(config-if)#standby 10 priority 150

R2(config-if)#standby 10 preempt

R2(config-if)#exit

R2(config)#int vlan 20

R2(config-if)#ip address 192.168.20.252 255.255.255.0

R2(config-if)#standby 20 ip 192.168.20.254

R2(config-if)#standby 20 priority 100

R2(config-if)#standby 20 preempt

 

R3(config)#int vlan 10

R3(config-if)#ip address 192.168.10.252 255.255.255.0

R3(config-if)#standby 10 ip 192.168.10.254

R3(config-if)#standby 10 priority 100

R3(config-if)#standby 10 preempt

R3(config-if)#exit

 

R3(config)#int vlan 20

R3(config-if)#ip address 192.168.20.253 255.255.255.0

R3(config-if)#standby 20 ip 192.168.20.254

R3(config-if)#standby 20 priority 150

R3(config-if)#standby 20 preempt 

 

 

監(jiān)控遠(yuǎn)端故障,實(shí)現(xiàn)快速切換

R2(config)#track 10 interface f0/0 ip routing

R2(config-track)#exit

R2(config)#int vlan 10

R2(config-if)#standby 10 track 10 decrement 100

R2(config-if)#exit

 

測試:

原本:

R6#traceroute 192.168.20.2

 

Type escape sequence to abort.

Tracing the route to 192.168.20.2

 

  1 192.168.10.253 32 msec 32 msec 44 msec

  2 192.168.20.253 44 msec

    192.168.20.2 40 msec 20 msec

 

關(guān)閉:

R2(config)#int f0/0

R2(config-if)#shut

*Mar  1 01:47:48.447: %HSRP-5-STATECHANGE: Vlan10 Grp 10 state Active -> Speak

 

R6#traceroute 192.168.20.2

 

Type escape sequence to abort.

Tracing the route to 192.168.20.2

 

  1 192.168.10.252 40 msec 44 msec 28 msec

  2 192.168.20.2 32 msec 20 msec 48 msec

 

恢復(fù):

*Mar  1 01:48:33.547: %HSRP-5-STATECHANGE: Vlan10 Grp 10 state Standby -> Active

 


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

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

AI