天天看點

三層交換機間的互聯

網絡裝置: 兩台CISCO 3560 三層交換機,兩台PC ,

操作環境: cisco packet tracer 5.0 網絡模拟器

網絡拓撲結構:

三層交換機間的互聯

實訓目的:

1.    三層交換機端口的啟用及ip位址的配置

2.    三層裝置間的路由配置方法

實驗步驟:

1.      規劃網絡拓撲圖: 如上圖所示:

2.    配置pc 0的ip位址為192.168.2.2 ,子網路遮罩 255.255.255.0

網關 192.168.2.1 , PC 1 的ip位址為192.168.1.2  ,掩碼為 255.255.255.0  網關為 192.168.1.1

3網絡配置表:

Switch2 的配置

Switch>enable    (進入特權模式)

Switch# configure terminal   (進入全局配置模式)

Switch(config-if)# interface f0/24  (進入端口模式)

Switch(config-if)# no switchport  ()

Switch(config-if)# ip  address 172.16.1.2  255.255.255.252 (配置端口ip及掩碼)

Switch(config-if)# no shutdown ( 激活端口)

Switch(config-if)#exit (退回到全局模式)

Switch(config)#vlan 20 (建立vlan)

Switch(config-vlan)# exit (退回全局模式)

Switch(config)# interface range f0/1 – 23 (進入 端口模式)

Switch(config-if)# switchport  access vlan 20 (将端口接入 vlan)

Switch(config-if)# exit (退回全局模式)

Switch(config)# ip route 192.168.1.0  255.255.255.0  172.16.1.1(配置靜态路由功能)

Switch(config)# exit (退回特權模式)

Switch# write (儲存設定)

配置switch 1 交換機

Switch>enable

Switch# configure terminal

Switch(config-if)# interface f0/24

Switch(config-if)# no switchport

Switch(config-if)# ip  address 172.16.1.1  255.255.255.252

Switch(config-if)# no shutdown

Switch(config-if)#exit

Switch(config)#vlan 10

Switch(config-vlan)# exit

Switch(config)# interface range f0/1 – 23

Switch(config-if)# switchport  access vlan 10

Switch(config-if)# exit

Switch(config)# ip route 192.168.1.0  255.255.255.0  172.16.1.1

Switch(config)# exit

Switch(config)#end

Switch# write

3.    檢驗配置

在pc 機的指令行,執行ping 172.168.1.2指令,看能不能ping 通,通說明,配置成功,兩個三層交換機實作了互聯通信 ,可以ping 網關

三層交換機間的互聯

繼續閱讀