思科路由器靜態路由表的配置

首先將網段合理分配,如下是一個實驗例子。

我們要實現的是對router0和router1的靜態路由表的配置,具體配置步驟如下:

router0:

Router>en 

Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 192.168.0.2 255.255.255.0
Router(config-if)#no sh

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#exi
Router(config)#int f0/1
Router(config-if)#ip add 10.1.5.2 255.255.255.0
Router(config-if)#no sh

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#exi
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config)#ip route 10.1.5.0 255.255.255.0 f0/1
Router(config)#ip route 192.168.1.0 255.255.255.0 f0/1

router1

Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 10.1.5.1 255.255.255.0
Router(config-if)#no sh u

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
Router(config-if)#exi
Router(config)#int f0/1
Router(config-if)#ip add 192.168.1.2
% Incomplete command.
Router(config-if)#ip add 192.168.1.2 255.255.255.0
Router(config-if)#no shu 

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#exi
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%SYS-5-CONFIG_I: Configured from console by console
Router#confi t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ip route 192.168.0.0 255.255.255.0 f0/0
Router(config)#ip route 10.1.5.0 255.255.255.0 f0/0

按照上述的步驟配置完成後,可以在pc0上面執行ping命令:

ping 192.168.1.1

發現能ping通,說明配置成功

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