配置:
Building configuration...
Current configuration : 657 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
interface Ethernet0
ip address 172.1.1.2 255.255.255.0
!
interface Serial0
ip address 192.1.1.1 255.255.255.0
router ospf 10
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
end
Building configuration...
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial0
ip address 192.1.1.2 255.255.255.0
clock rate 64000
!
interface Serial1
ip address 202.1.1.2 255.255.255.0
clock rate 64000
!
router ospf 10
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
end
Building configuration...
Current configuration : 715 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
interface Serial0
ip address 10.1.1.2 255.255.255.0
!
interface Serial1
ip address 202.1.1.1 255.255.255.0
!
router ospf 10
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
end
Building configuration...
Current configuration : 758 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0
ip address 172.1.1.1 255.255.255.0
!
interface Serial0
ip address 10.1.1.1 255.255.255.0
!
interface Serial1
ip address 148.1.1.1 255.255.255.0
shutdown
clock rate 64000
!
router ospf 10
log-adjacency-changes
redistribute connected subnets
network 10.1.1.1 0.0.0.0 area 0
network 172.1.1.1 0.0.0.0 area 0
!
end
3.0.0.0/24 is subnetted, 1 subnets
O E2 3.3.3.0 [110/20] via 192.1.1.1, 00:12:39, Serial0
20.0.0.0/32 is subnetted, 1 subnets
O 20.20.30.1 [110/65] via 202.1.1.1, 00:12:39, Serial1
172.1.0.0/24 is subnetted, 1 subnets
O 172.1.1.0 [110/74] via 192.1.1.1, 00:12:39, Serial0
R2#
*Mar 1 02:26:39.267: %SYS-5-CONFIG_I: Configured from console by console
R2#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
C 2.2.2.0 is directly connected, Loopback0
3.0.0.0/24 is subnetted, 1 subnets
O E2 3.3.3.0 [110/20] via 192.1.1.1, 00:00:04, Serial0
[110/20] via 202.1.1.1, 00:00:04, Serial1
172.1.0.0/24 is subnetted, 1 subnets
O 172.1.1.0 [110/74] via 192.1.1.1, 00:00:04, Serial0
C 202.1.1.0/24 is directly connected, Serial1
10.0.0.0/24 is subnetted, 1 subnets
O 10.1.1.0 [110/74] via 202.1.1.1, 00:00:04, Serial1
C 192.1.1.0/24 is directly connected, Serial0