网络配置rip路由配置
实验二默认路由和RIP路由的配置1.具体配置拓扑图
其中
Router0
Router1
Router2
2.配置过程
⑴准备工作
先配置Router0,Router1和Router2的基本信息,注意Router1作为DCE提供时钟频率
Router0
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#int s0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to down
Router(config-if)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Router1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip address 192.168.4.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#int s0/0
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
Router(config-if)#int s0/1
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state
^
% Invalid input detected at '^' marker.
Router(config-if)#int s0/1
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/1, changed state to down
Router(config-if)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Router2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip address 192.168.5.1 255.255.255.0
Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#int s0/0
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up Router(config-if)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run start
Destination filename [startup-config]? Building configuration...
[OK]
再分别配置PC0、PC1和PC2的基本信息PC0
PC1
PC2
⑵先配置Router0的默认路由并验证,然后配置Router0的RIP路由并验证Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
Router(config)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, Serial0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.2
Router(config)#router rip
Router(config-router)#network 192.168.3.0
Router(config-router)#network 192.168.1.0
Router(config-router)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, Serial0/0
R 192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:10, Serial0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
R 192.168.4.0/24 [120/1] via 192.168.1.2, 00:00:10, Serial0/0
R 192.168.5.0/24 [120/2] via 192.168.1.2, 00:00:10, Serial0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.2
⑶配置Router1的RIP路由并验证
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.4.0
Router(config-router)#network 192.168.2.0
Router(config-router)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/1
R 192.168.3.0/24 [120/1] via 192.168.1.1, 00:00:08, Serial0/0
C 192.168.4.0/24 is directly connected, FastEthernet0/0
R 192.168.5.0/24 [120/1] via 192.168.2.2, 00:00:05, Serial0/1
⑷先配置Router2的默认路由并验证,然后配置Router2的RIP路由并验证
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.1
Router(config)#router rip
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.5.0
Router(config-router)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 192.168.2.1 to network 0.0.0.0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:14, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/0
R 192.168.3.0/24 [120/2] via 192.168.2.1, 00:00:14, Serial0/0
R 192.168.4.0/24 [120/1] via 192.168.2.1, 00:00:14, Serial0/0
C 192.168.5.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.2.
⑸验证整个网络的连通性
从测试结果看,两两都能ping通,说明没有问题,网络已经建立好。