彙整 Cisco 路由器四大動態路由協議 (RIP、IGRP、OSPF、EIGRP) 的啟用、網路宣告、查看與關鍵參數指令。
Router> enable
Router# configure terminal
Router(config)# interface s0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.252
Router(config-if)# clock rate 500000 # DCE 端設定時鐘
Router(config-if)# bandwidth 64 # 影響路由度量
Router(config)# ip routing # 三層交換/路由器預設已開
router rip
version 2
network 192.168.1.0
network 192.168.2.0
no auto-summary
查看:show ip route rip
router igrp 100 # 100 為自治系統號
network 192.168.1.0
network 192.168.2.0
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
查看:show ip route ospf、show ip ospf neighbor
router eigrp 200
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
no auto-summary
關鍵:no auto-summary 關閉自動彙總,支援 VLSM/CIDR。
show ip route
show ip protocols
ping 192.168.2.1
實務建議:中小網路首選 OSPF (廠商中立) 或 EIGRP (Cisco 環境收斂快);RIP 僅供教學或極小網路。