- 相關(guān)推薦
思科三層交換機路由功能配置實(shí)例
普通交換機工作在鏈路層,即二層交換機,無(wú)路由功能,也就是只能同一個(gè)網(wǎng)段的機器才能通信。下面是小編收集的思科三層交換機路由功能配置實(shí)例,希望對你有幫助!
配置23口:
Switch#enable
Switch#configure terminal
Switch(config)#interface fastEthernet 0/23
Switch(config)ip addr 50.1.1.1 255.255.255.0
Switch(config-if)#no switchport
Switch(config-if)#no shutdown
Switch(config-if)#end
類(lèi)似的配置24口:
Switch#enable
Switch#configure terminal
Switch(config)#interface fastEthernet 0/24
Switch(config)ip addr 60.1.1.1 255.255.255.0
Switch(config-if)#no switchport
Switch(config-if)#no shutdown
Switch(config-if)#end
打開(kāi)交換機路由轉發(fā)開(kāi)關(guān):
Switch#configure terminal
Switch(config)#ip routing
Switch(config)#ip cef (這個(gè)默認是打開(kāi)的)
此時(shí)可以查看下23口的狀態(tài):
Switch#show interfaces fastEthernet 0/23
此時(shí)在交換機上ping兩個(gè)口的地址成功:
Switch#ping 50.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 50.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Switch#ping 60.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 60.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Switch#
pc1(win7)增加路由:
到60.1.1.0/24的數據包通過(guò)50.1.1.1轉發(fā):
route ADD 60.1.1.0 MASK 255.255.255.0 50.1.1.1 METRIC 3
對應的pc2也增加路由:
route ADD 50.1.1.0 MASK 255.255.255.0 60.1.1.1 METRIC 3
此時(shí)50.1.1.2和60.1.1.2即可通信。
如果使用了交換機口的路由功能,那么此口(即這里的23,24口)就沒(méi)有交換能力了。
如果又要交換機有路由功能,又有交換功能,那么交換功能可以由其它口負擔。
【思科三層交換機路由功能配置實(shí)例】相關(guān)文章:
思科三層交換機配置實(shí)例及命令10-24
思科三層交換機配置08-21
思科交換機劃分vlan配置實(shí)例09-15
思科三層交換機配置命令大全09-25
H3C配置三層交換機配置實(shí)例09-12
2016思科交換機和路由器的基本配置08-12
思科ACE的基本配置實(shí)例08-14