拓扑图:
1. 配置IP地址
R1配置IP地址:
R1(config)#int loopback0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#int s2/0
R1(config-if)#clock rate 128000
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shut
配置R2 IP:
R2(config)#int loopback0
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R2(config-if)#int s2/0
R2(config-if)#clock rate 128000
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s3/0
R2(config-if)#clock rate 128000
R2(config-if)#ip address 192.168.23.2 255.255.255.0
R2(config-if)#no shut
配置R3 IP:
R3(config)#int loopback0
R3(config-if)#ip address 3.3.3.3 255.255.255.0
R3(config-if)#int s3/0
R3(config-if)#clock rate 128000
R3(config-if)#ip address 192.168.23.3 255.255.255.0
R3(config-if)#no shut
2. 配置静态路由
R1配置静态路由:
R1(config)#ip route 2.2.2.0 255.255.255.0 s2/0
R1(config)#ip route 3.3.3.0 255.255.255.0 s2/0
R2配置静态路由:
R2(config)#ip route 1.1.1.0 255.255.255.0 s2/0
R2(config)#ip route 3.3.3.0 255.255.255.0 s3/0
R3配置静态路由:
R3(config)#ip route 1.1.1.0 255.255.255.0 s2/0
R3(config)#ip route 2.2.2.0 255.255.255.0 s2/0
3. 实验测试
R1:
R1#sh 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
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 is directly connected, Serial2/0
3.0.0.0/24 is subnetted, 1 subnets
S 3.3.3.0 [1/0] via 192.168.12.2
C 192.168.12.0/24 is directly connected, Serial2/0
R2:
R2#sh 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
1.0.0.0/24 is subnetted, 1 subnets
S 1.1.1.0 is directly connected, Serial2/0
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
3.0.0.0/24 is subnetted, 1 subnets
S 3.3.3.0 is directly connected, Serial3/0
C 192.168.12.0/24 is directly connected, Serial2/0
C 192.168.23.0/24 is directly connected, Serial3/0
R3:
R3#sh 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
1.0.0.0/24 is subnetted, 1 subnets
S 1.1.1.0 is directly connected, Serial3/0
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 is directly connected, Serial3/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
C 192.168.23.0/24 is directly connected, Serial3/0
本文转simmy51CTO博客,原文链接:http://blog.51cto.com/helpdesk/295160,如需转载请自行联系原作者