我们这次要做的实验为了通过配置静态路由使全网贯通
以下是R1、R2、R3的配置过程
R1
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#in f0/1
R1(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R1(config-if)#ip add 192.168.1.254 255.255.255.0
R1(config-if)#e
R1(config)#in f0/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
R1(config-if)#e
R1(config)#ip route 192.168.3.0 255.255.255.0
% Incomplete command.
R1(config)#ip route 192.168.3.0 255.255.255.0 f0/0
R1(config)#ip route 192.168.4.0 255.255.255.0 f0/0
R1(config)#ip route 192.168.5.0 255.255.255.0 f0/0
R1(config)#end
R2
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#in f0/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#e
R2(config)#in f0/1
R2(config-if)#ip add 192.168.4.1 255.255.255.0
R2(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
R2(config-if)#e
R2(config)#in e0/0/0
R2(config-if)#no sh
%LINK-5-CHANGED: Interface Ethernet0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0/0, changed state to up
R2(config-if)#ip add 192.168.3.254 255.255.255.0
R2(config-if)#ip rotue 192.168.1.0 255.255.255.0 f0/0
^
% Invalid input detected at ‘^‘ marker.
R2(config-if)#ip route 192.168.1.0 255.255.255.0 f0/0
R2(config)#ip route 192.168.5.0 255.255.255.0 f0/1
R2(config)#end
R3
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R3
R3(config)#inf 0/0
^
% Invalid input detected at ‘^‘ marker.
R3(config)#in f0/0
R3(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R3(config-if)#ip add 192.168.4.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#in f0/1
R3(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R3(config-if)#ip add 192.168.5.254 255.255.255.0
R3(config-if)#e
R3(config)#ip route 192.168.1.0 255.255.255.0 f0/0
R3(config)#ip route 192.168.2.0 255.255.255.0 f0/0
R3(config)#ip route 192.168.3.0 255.255.255.0 f0/0
R3(config)#end