首先看拓扑:
一个面试考官问我一个这样的问题,拓扑如上,为什么R1上的lo0 PING 不通 R6 上的lo0,说是一切都按正常配置,说是考我EIGRP的特性。我当然很纳闷,如果都正常配置怎么会不通呢,最后他告诉我主要是考我,EIGRP的域内管理距离是90,域外管理距离是170。当时可能不够自信也没多想,回来后越想越不对,一般来说,只有到达目的地有两条路由的时候才会考虑管理距离,但这里没有这个情况啊,于是自已设计了一个实验加以验证,结果是,可以通。
R3 与 R5 R4与R5 使用帧中继相连,DLCI号分别为:305 503 405 504
帧中继只能用点到点子接口。
主要配置如下:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
interface Serial1/1
ip address 10.10.12.1 255.255.255.252
router rip
version 2
network 1.0.0.0
network 10.0.0.0
no auto-summary
R2:
interface FastEthernet0/0
ip address 10.10.24.1 255.255.255.252
duplex half
!
interface Serial1/0
ip address 10.10.12.2 255.255.255.252
serial restart-delay 0
clock rate 64000
router eigrp 1
redistribute rip metric 10000 100 255 1 1500
network 10.10.23.0 0.0.0.255
network 10.10.24.0 0.0.0.255
no auto-summary
!
router rip
version 2
redistribute eigrp 1 metric 2
network 10.0.0.0
no auto-summary
R3:
interface Serial1/0
ip address 10.10.23.2 255.255.255.252
serial restart-delay 0
!
interface Serial1/2
ip address 10.10.35.1 255.255.255.252
encapsulation frame-relay
serial restart-delay 0
frame-relay map ip 10.10.35.2 305 broadcast //静态映射,DLCI号是帧中继交换分配置的,如果不配置就不通。
no frame-relay inverse-arp //静态映射要关闭反向ARP
router eigrp 1
network 10.10.23.0 0.0.0.255
network 10.10.35.0 0.0.0.255
no auto-summary
!
R4:
interface FastEthernet0/0
ip address 10.10.24.2 255.255.255.252
duplex half
interface Serial1/2
ip address 10.10.45.1 255.255.255.252
encapsulation frame-relay
serial restart-delay 0
frame-relay map ip 10.10.45.2 405 broadcast
no frame-relay inverse-arp
router eigrp 1
network 10.10.24.0 0.0.0.255
network 10.10.34.0 0.0.0.255
network 10.10.45.0 0.0.0.255
no auto-summary
R5:
interface Serial1/1
ip address 10.10.56.1 255.255.255.252
serial restart-delay 0
interface Serial1/2.1 point-to-point
ip address 10.10.45.2 255.255.255.252
frame-relay interface-dlci 504
!
interface Serial1/2.2 point-to-point
ip address 10.10.35.2 255.255.255.252
frame-relay interface-dlci 503
router eigrp 1
redistribute ospf 100 metric 10000 100 255 1 1500
network 10.10.35.0 0.0.0.255
network 10.10.45.0 0.0.0.255
no auto-summary
!
router ospf 100
log-adjacency-changes
redistribute eigrp 1 subnets //默认为TYPE 2,cost 为20
network 10.10.56.0 0.0.0.255 area 0
R6:
interface Serial1/0
ip address 10.10.56.2 255.255.255.252
serial restart-delay 0
router ospf 100
log-adjacency-changes
network 6.6.6.0 0.0.0.255 area 0
network 10.10.56.0 0.0.0.255 area 0
结果测试:R1 PING R6
R1#ping 6.6.6.6 so 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/92/132 ms
R1#
R6 PING R1
R6#ping 1.1.1.1 so 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/102/120 ms
R6#