在CCNA里有这样的一个题目:

 

136. Refer to the exhibit. According to the routing table, where will the router send a packet destined for 10.1.5.65?
 

路由表


A. 10.1.1.2
B. 10.1.2.2
C. 10.1.3.3
D. 10.1.4.4

根据最长前缀匹配原则,选C。

 

但是我突然对最长前缀匹配原则有些许疑问,是不是不管数据包的目的地址在哪个方向,路由一律都是按照最长前缀匹配来发送呢?

例如在题中,是不是即使10.1.5.65这个主机其实是在S1方向,但路由器依然会把数据包从S0方向发送出去,而不管实际情况呢??

 

基于此,我用Packet Tracer 来模拟了题目中环境。

 

拓朴结构(Packet Tracer模拟)

 

R1:

interface FastEthernet0/0
 ip address 10.1.5.65 255.255.255.224
 duplex auto
 speed auto

interface Serial1/0
 ip address 10.1.1.2 255.255.255.0
 clock rate 128000
!
router rip
 version 2
 network 10.0.0.0
 no auto-summary
!
ip classless

 

 

R2:
interface Serial1/0
 ip address 10.1.1.1 255.255.255.0
!
interface Serial1/1
 ip address 10.1.2.1 255.255.255.0
!
interface Serial1/2
 ip address 10.1.3.1 255.255.255.0
!
router rip
 version 2
 network 10.0.0.0
 no auto-summary
!
ip classless

 

R3:

interface FastEthernet0/0
 ip address 10.1.5.66 255.255.255.240
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.1.2.2 255.255.255.0
 clock rate 128000
!
router rip
 version 2
 network 10.0.0.0
 no auto-summary
!
ip classless

 

R4:

interface FastEthernet0/0
 ip address 10.1.5.67 255.255.255.248
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.1.3.2 255.255.255.0
 clock rate 128000
!
router rip
 version 2
 network 10.0.0.0
 no auto-summary
!
ip classless

 

 

结果的状况是:R2,R3,R4可以互相通信,这三者也都能ping通R1 上的S1/0接口的10.1.1.2 ,但是却ping 不通F0/0上的10.1.5.65

 

不知为何。。。待续。。。