雙核心網絡綜合實驗

【實驗名稱】雙核心網絡綜合實驗

【實驗目的】

1、 掌握MSTP部署

2、 掌握VRRP協議配置

3、 掌握MSTP+VRRP的雙機熱備技術

4、 瞭解基於內部源的動態NAPT配置方法

5、 掌握動態路由(默認路由分發)或者浮動路由配置技術

【實驗拓撲】

 詳見附件

【配置要求及配置步驟

1)按照圖示完成實驗設備連接和地址規劃,設備名設置爲“組號-設備編號-設備名” (如A1-S3550-1-H1)。

2)二層交換機的VLAN規劃:

VL10

VL20

VL30

VL40

F0/5-F0/10

F0/11-F0/15

F0/15-F0/20

F0/21-F0/24

(3)按要求配置交換機VLAN、SVI接口。


前三個是非常基礎的配置,這裏不再給出!需要注意的是交換機之間互聯需要將端口配置爲trunk!


(4)按要求配置路由器和三層交換機路由接口,使用ping驗證鏈路聯通。

H1

H1(config)#interface f0/4

H1(config-if)#no switchport

H1(config-if)#ip address 172.16.1.2 255.255.255.252

H1(config-if)#no shutdown

H2:

H2(config)#interface f0/4

H2(config-if)#no switchport

H2(config-if)#ip address 172.16.1.6 255.255.255.252

H2(config-if)#no shutdown

R2

R1(config)#interface f1/0

R1(config-if)#ip address 172.16.1.1 255.255.255.252

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface f1/1

R1(config-if)#ip address 172.16.1.5 255.255.255.252

R1(config-if)#no shutdown

5)在四臺交換機上部署MSTP協議,要求設置兩個實例,實例1關聯VL10VL30;實例2關聯VL20VL40。要求MST修訂號設置爲1,名稱爲組號。要求H1爲實例1的根交換機、H2爲實例2的根交換機,互爲備份。

使用show spanning-tree mst configuration命令查看MST配置信息,使用show spanning-tree mstshow spanning-tree mst interface命令分別查看交換機的MST1MST2以及相應接口的信息驗證配置結果。

S1:

開啓生成樹

S1 (config)#spanning-tree     

 !配置生成樹模式爲MSTP

S1 (config)#spanning-tree mode mstp    

進入MSTP配置模式 

S1 (config)#spanning-tree mst configuration   

!配置instance 1(實例1)並關聯Vlan 10和30  

S1 (config-mst)#instance 1 vlan 10,30   

!配置實例2並關聯Vlan 2040 

S1 (config-mst)#instance 2 vlan 20,40   

 !配置域名稱   

S1 (config-mst)#name fsy

 !配置版本(修訂號)

S1 (config-mst)#revision 1

S2:

S2 (config)#spanning-tree     

S2 (config)#spanning-tree mode mstp    

S2 (config)#spanning-tree mst configuration   

S2 (config-mst)#instance 1 vlan 10,30   

S2 (config-mst)#instance 2 vlan 20,40   

S2 (config-mst)#name fsy

S2 (config-mst)#revision 1

H1:

H1 (config)#spanning-tree     

H1 (config)#spanning-tree mode mstp    

H1 (config)#spanning-tree mst configuration   

H1 (config-mst)#instance 1 vlan 10,30   

H1 (config-mst)#instance 2 vlan 20,40   

H1 (config-mst)#name fsy

H1 (config-mst)#revision 1

!配置交換機H1instance 1中的優先級爲4096  ,缺省是32768,值越小越優先成爲該instance中的root switch

H1 (config)#spanning-tree mst 1 priority 4096  

H2:

H2 (config)#spanning-tree     

H2 (config)#spanning-tree mode mstp    

H2 (config)#spanning-tree mst configuration   

H2 (config-mst)#instance 1 vlan 10,30   

H2 (config-mst)#instance 2 vlan 20,40   

H2 (config-mst)#name fsy

H2 (config-mst)#revision 1

H2 (config)#spanning-tree mst 2 priority 4096   

(6)在兩臺三層交換機上部署VRRP協議,各VLAN的網關地址統一使用*.*.*.254。要求VRRP主路由與MSTP根橋保持一致性,使用show vrrp (brief)檢查結果。注意新舊版本中的standbyvrrp的使用差別。

H1:

H1(config)# interface vlan 10

!配置VRRP10虛擬路由器IP

H1(config-if)# standby 10 ip 172.16.10.254

!配置VRRP10優先級200

H1(config-if)# standby 10 priority 200

H1(config-if)# exit

H1(config)# interface vlan 20

H1(config-if)# standby 20 ip 172.16.20.254

H1(config-if)# standby 20 priority 100

H1(config-if)# exit

H1(config)# interface vlan 30

H1(config-if)# standby 30 ip 172.16.30.254

H1(config-if)# standby 30 priority 200

H1(config-if)# exit

H1(config)# interface vlan 40

H1(config-if)# standby 40 ip 172.16.40.254

H1(config-if)# standby 40 priority 100

H1(config-if)# exit

H2:

H2(config)# interface vlan 10

H2(config-if)# standby 10 ip 172.16.10.254

H2(config-if)# standby 10 priority 100

H2(config-if)# exit

H2(config)# interface vlan 20

H2(config-if)# standby 20 ip 172.16.20.254

H2(config-if)# standby 20 priority 200

H2(config-if)# exit

H2(config)# interface vlan 30

H2(config-if)# standby 30 ip 172.16.30.254

H2(config-if)# standby 30 priority 100

H2(config-if)# exit

H2(config)# interface vlan 40

H2(config-if)# standby 40 ip 172.16.40.254

H2(config-if)# standby 40 priority 200

H2(config-if)# exit

(7)以路由器迴環口模擬運營商接入線路,在路由器和三層交換機上完成路由配置,可使用動態路由或者靜態路由加浮動路由解決,注意各三層設備的默認路由如何實現?使用show ip route查看結果。

R1:

R1(config)#interface loopback 1

R1(config-if)#ip address 202.100.1.1 255.255.255.252

R1(config)#router ospf 1

R1(config)#exit

R1(config-router)#network 202.100.1.1 0.0.0.3 area 0

R1(config-router)#network 172.16.1.1 0.0.0.3 area 0

R1(config-router)#network 172.16.1.5 0.0.0.3 area 0

H1:

H1(config)#ip routing 0.0.0.0 0.0.0.0 202.100.1.1

H1(config)#router ospf 1

H1(config-router)#network 172.16.1.2 0.0.0.3 area 0

H1(config-router)#network 172.16.10.0 0.0.0.255 area 0

H1(config-router)#network 172.16.20.0 0.0.0.255 area 0

H1(config-router)#network 172.16.30.0 0.0.0.255 area 0

H1(config-router)#network 172.16.40.0 0.0.0.255 area 0

H2:

H2(config)#ip routing 0.0.0.0 0.0.0.0 202.100.1.1

H2(config)#router ospf 1

H2(config-router)#network 172.16.1.6 0.0.0.3 area 0

H2(config-router)#network 172.16.10.0 0.0.0.255 area 0

H2(config-router)#network 172.16.20.0 0.0.0.255 area 0

H2(config-router)#network 172.16.30.0 0.0.0.255 area 0

H2(config-router)#network 172.16.40.0 0.0.0.255 area 0

8)在路由器上配置基於內部源的動態NAPT,實現VL10VL20VL30用戶可以訪問互聯網。

R1:

R1(config)#access-list 10 permit 172.16.10.0 0.0.0.255

R1(config)#access-list 10 permit 172.16.20.0 0.0.0.255

R1(config)#access-list 10 permit 172.16.30.0 0.0.0.255

R1(config)#ip nat pool fsy 202.100.1.1 202.100.1.1 netmask 255.255.255.252

R1(config)#ip nat inside source list 10 pool fsy overload

R1(config)#ip nat inside source list 20 pool fsy overload

R1(config)#ip nat inside source list 30 pool fsy overload

    R1(config)#interface f1/0

R1(config-if)#ip nat inside

R1(config)#interface f1/1

R1(config-if)#ip nat inside

R1(config)#interface loopback 1

R1(config-if)#ip nat outside

此時,配置完成,可以開始測試!

(因爲思科默默器無法實現上述配置,我是在做完實驗的基礎上總結的,難免有錯誤,歡迎指正)

           


           歡迎批評指正!

 

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章