- 论坛徽章:
- 0
|
R1配置:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
interface Serial1/2
ip address 12.0.0.1 255.255.255.0
router rip
version 2
network 1.0.0.0
network 12.0.0.0
R2配置:
Router>EN
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int s2/1
R2(config-if)#ip add 12.0.0.2 255.255.255.0
Bad mask /24 for address 12.0.0.2
R2(config-if)#ip subnet-zero
R2(config)#int s2/1
R2(config-if)#ip add 12.0.0.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s2/3
R2(config-if)#ip add 23.0.0.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#
R2#
R2#conf t
R2(config)#router rip
R2(config-router)#ve 2
R2(config-router)#net 12.0.0.0
R2(config-router)#net 23.0.0.0
R2(config-router)#
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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
R 1.0.0.0/8 [120/1] via 12.0.0.1, 00:00:26, Serial2/1
R 3.0.0.0/8 [120/1] via 23.0.0.3, 00:00:33, Serial2/3
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial2/3
R2#
R3配置:
Router>EN
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ost R3
^
% Invalid input detected at '^' marker.
Router(config)#host R3
R3(config)#ints3/2
^
% Invalid input detected at '^' marker.
R3(config)#int s3/2
R3(config-if)#ip add 23.0.0.3 255.255.255.0
Bad mask /24 for address 23.0.0.3
R3(config-if)#ip subnet-zero
R3(config)#int s3/2
R3(config-if)#ip add 23.0.0.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int loopback1
R3(config-if)#
%LINK-3-UPDOWN: Interface Serial3/2, changed state to upip
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to upad
d 3.3.3.3 255.255.255.0
R3(config-if)#no shut
R3(config)#router rip
R3(config-router)#ve 2
R3(config-router)#net 23.0.0.0
R3(config-router)#net 3.0.0.0
R3(config-router)#
R3(config-router)#distribute-list 1 in s3/2
R3(config-router)#exit
R3(config)#no au
R3(config)#
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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
R 1.0.0.0/8 [120/2] via 23.0.0.2, 00:00:08, Serial3/2
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback1
R 12.0.0.0/8 [120/1] via 23.0.0.2, 00:00:09, Serial3/2
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial3/2
R3#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 188/506/1204 ms
R3#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 136/502/1116 ms
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/38497/showart_302907.html |
|