- Chen
-
你好,
以下配置在Cisco Packet Tracer5.3环境下完成,若需要实验配置文件,留下邮箱,可以发给你。
各路由器配置如下:
//R1配置文件
R1#show run
Building configuration...
Current configuration : 956 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
username R4 password 0 123
!
!
no ip domain-lookup
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1 //对应你的拓扑图中的e0口
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0 //对应你的拓扑图中的s0口
ip address 10.0.1.1 255.255.255.0
encapsulation frame-relay
frame-relay map ip 10.0.1.2 102 broadcast
frame-relay map ip 10.0.1.3 103 broadcast
frame-relay lmi-type ansi
ip ospf network broadcast
!
interface Serial0/1 //对应你的拓扑图中的s1口
ip address 10.0.2.1 255.255.255.0
encapsulation ppp
ppp authentication pap
clock rate 64000
!
router ospf 100
log-adjacency-changes
network 10.0.1.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
network 10.0.2.0 0.0.0.255 area 1
!
ip classless
!
!
line con 0
line vty 0 4
login
!
!
end
//查看R1路由表
R1#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
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.1.0 is directly connected, Serial0/0
C 10.0.2.0 is directly connected, Serial0/1
O IA 10.0.3.0 [110/1562] via 10.0.1.2, 00:00:39, Serial0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/1
O 192.168.2.0/24 [110/782] via 10.0.1.2, 00:00:39, Serial0/0
O 192.168.3.0/24 [110/782] via 10.0.1.3, 00:00:39, Serial0/0
O 192.168.4.0/24 [110/782] via 10.0.2.2, 00:01:13, Serial0/1
O IA 192.168.5.0/24 [110/1563] via 10.0.1.2, 00:00:39, Serial0/0
R1#
//R2配置文件
R2#show run
Building configuration...
Current configuration : 936 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
username R5 password 0 123
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1 //对应你的拓扑图中的e0口
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0 //对应你的拓扑图中的s0口
ip address 10.0.1.2 255.255.255.0
encapsulation frame-relay
frame-relay map ip 10.0.1.1 201 broadcast
frame-relay map ip 10.0.1.3 203 broadcast
frame-relay lmi-type ansi
ip ospf network broadcast
!
interface Serial0/1 //对应你的拓扑图中的s1口
ip address 10.0.3.1 255.255.255.0
encapsulation ppp
ppp authentication pap
clock rate 64000
!
router ospf 100
log-adjacency-changes
network 10.0.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 10.0.3.0 0.0.0.255 area 2
!
ip classless
!
!
line con 0
line vty 0 4
login
!
!
end
//查看R2路由表
R2#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
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.1.0 is directly connected, Serial0/0
O IA 10.0.2.0 [110/1562] via 10.0.1.1, 00:02:46, Serial0/0
C 10.0.3.0 is directly connected, Serial0/1
O 192.168.1.0/24 [110/782] via 10.0.1.1, 00:02:46, Serial0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
O 192.168.3.0/24 [110/782] via 10.0.1.3, 00:02:46, Serial0/0
O IA 192.168.4.0/24 [110/1563] via 10.0.1.1, 00:02:46, Serial0/0
O 192.168.5.0/24 [110/782] via 10.0.3.2, 00:03:14, Serial0/1
R2#
//R3配置文件
R3#show run
Building configuration...
Current configuration : 754 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R3
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1 //对应你的拓扑图中的e0口
ip address 192.168.3.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0 //对应你的拓扑图中的s0口
ip address 10.0.1.3 255.255.255.0
encapsulation frame-relay
frame-relay map ip 10.0.1.1 301 broadcast
frame-relay map ip 10.0.1.2 302 broadcast
frame-relay lmi-type ansi
ip ospf network broadcast
!
router ospf 100
log-adjacency-changes
network 192.168.3.0 0.0.0.255 area 0
network 10.0.1.0 0.0.0.255 area 0
!
ip classless
!
!
line con 0
line vty 0 4
login
!
!
end
//查看R3路由表
R3#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
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.1.0 is directly connected, Serial0/0
O IA 10.0.2.0 [110/1562] via 10.0.1.1, 00:06:02, Serial0/0
O IA 10.0.3.0 [110/1562] via 10.0.1.2, 00:06:02, Serial0/0
O 192.168.1.0/24 [110/782] via 10.0.1.1, 00:06:12, Serial0/0
O 192.168.2.0/24 [110/782] via 10.0.1.2, 00:06:12, Serial0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/1
O IA 192.168.4.0/24 [110/1563] via 10.0.1.1, 00:06:02, Serial0/0
O IA 192.168.5.0/24 [110/1563] via 10.0.1.2, 00:06:02, Serial0/0
R3#
//R4配置文件
R4#show run
Building configuration...
Current configuration : 647 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R4
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1 //对应你的拓扑图中的e0口
ip address 192.168.4.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0 //对应你的拓扑图中的s1口
ip address 10.0.2.2 255.255.255.0
encapsulation ppp
ppp pap sent-username R4 password 0 123
!
router ospf 100
log-adjacency-changes
network 192.168.4.0 0.0.0.255 area 1
network 10.0.2.0 0.0.0.255 area 1
!
ip classless
!
line con 0
line vty 0 4
login
!
!
end
//查看R4路由表
R4#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
10.0.0.0/24 is subnetted, 3 subnets
O IA 10.0.1.0 [110/1562] via 10.0.2.1, 00:07:43, Serial0/0
C 10.0.2.0 is directly connected, Serial0/0
O IA 10.0.3.0 [110/2343] via 10.0.2.1, 00:07:43, Serial0/0
O IA 192.168.1.0/24 [110/782] via 10.0.2.1, 00:07:53, Serial0/0
O IA 192.168.2.0/24 [110/1563] via 10.0.2.1, 00:07:43, Serial0/0
O IA 192.168.3.0/24 [110/1563] via 10.0.2.1, 00:07:43, Serial0/0
C 192.168.4.0/24 is directly connected, FastEthernet0/1
O IA 192.168.5.0/24 [110/2344] via 10.0.2.1, 00:07:43, Serial0/0
R4#
//R5配置文件
R5#show run
Building configuration...
Current configuration : 667 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R5
!
!
no ip domain-lookup
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1 //对应你的拓扑图中的e0口
ip address 192.168.5.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0 //对应你的拓扑图中的e0口
ip address 10.0.3.2 255.255.255.0
encapsulation ppp
ppp pap sent-username R5 password 0 123
!
router ospf 100
log-adjacency-changes
network 10.0.3.0 0.0.0.255 area 2
network 192.168.5.0 0.0.0.255 area 2
!
ip classless
!
!
line con 0
line vty 0 4
login
!
!
end
//查看R5路由表
R5#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
10.0.0.0/24 is subnetted, 3 subnets
O IA 10.0.1.0 [110/1562] via 10.0.3.1, 00:09:02, Serial0/0
O IA 10.0.2.0 [110/2343] via 10.0.3.1, 00:09:02, Serial0/0
C 10.0.3.0 is directly connected, Serial0/0
O IA 192.168.1.0/24 [110/1563] via 10.0.3.1, 00:09:02, Serial0/0
O IA 192.168.2.0/24 [110/782] via 10.0.3.1, 00:09:02, Serial0/0
O IA 192.168.3.0/24 [110/1563] via 10.0.3.1, 00:09:02, Serial0/0
O IA 192.168.4.0/24 [110/2344] via 10.0.3.1, 00:09:02, Serial0/0
C 192.168.5.0/24 is directly connected, FastEthernet0/1
R5#
以上,供参考