ipv6 静态路由不起作用

ipv6 静态路由不起作用

想知道 ipv6 静态路由默认路由不起作用,只能 ping 直连接口,但 sh run 命令给出了我创建的到其他网络的静态路由,但在 sh run 输出中,我看到了我创建的用于获取全局单播地址的自动配置静态路由,在下一行,我看到了我创建的用于到达远程网络的静态路由,有什么想法吗?我看不到任何成功 ping 到远程网络的情况

我提供了更多信息,一行中有 3 个路由器,即路由器 A、路由器 B、路由器 C,它们通过快速以太网连接。中间路由器 B 已手动配置其 ipv6 地址,其他两个路由通过 ipv6 地址自动配置命令接收全局单播地址

这是路由器 A 的“Sh run”输出

version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption 
!

hostname Router
!

! 
!

!
!

ipv6 unicast-routing
!

!
!

!
!

!
!

!
! 

!
spanning-tree mode pvst
!

!
!

!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address autoconfig
ipv6 enable
!

interface FastEthernet0/1
no ip address 
duplex auto
speed auto
shutdown
!

interface Vlan1
no ip address
shutdown
!

ip classless
!

ipv6 route 2001:DB6:3C4D:1::/64 FastEthernet0/0 FE80::200:CFF:FE4A:AC01
ipv6 route 2001:DB6:3C4D:2::/64 FastEthernet0/0

路由器 C 的 SH RUN 输出

Building configuration...

Current configuration : 660 bytes
!

version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!

hostname Router
!

!
!

!
!

ipv6 unicast-routing
!  

!
!

!
!

!
!

!
!

!
spanning-tree mode pvst
!

!
!

!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address autoconfig
ipv6 enable
!

interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown  
!

interface Vlan1
no ip address
shutdown
!

ip classless
!

ipv6 route 2001:DB6:3C4D:2::/64 FastEthernet0/0 FE80::200:CFF:FE4A:AC02
ipv6 route 2001:DB6:3C4D:1::/64 FastEthernet0/0
!

!
!

!
!

!
line con 0
!

line aux 0
!

line vty 0 4
login
!

!
!

end

路由器 A 路由表

Router#sh ipv6 route 
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP  
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary   
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
C 2001:DB6:3C4D:1::/64 [0/0]
via ::, FastEthernet0/0
L   2001:DB6:3C4D:1:260:5CFF:FEA8:3A01/128 [0/0]
via ::, FastEthernet0/0
S 2001:DB6:3C4D:2::/64 [1/0]
via ::, FastEthernet0/0
L FF00::/8 [0/0] 
via ::, Null0
Router#

路由器C路由表

Router#sh ipv6 route 
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP 
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2   
D - EIGRP, EX - EIGRP external
S 2001:DB6:3C4D:1::/64 [1/0] 
via ::, FastEthernet0/0
C 2001:DB6:3C4D:2::/64 [0/0]
via ::, FastEthernet0/0
L 2001:DB6:3C4D:2:290:CFF:FE49:7601/128 [0/0]
via ::, FastEthernet0/0
L FF00::/8 [0/0]
via ::, Null0

定义了静态路由,为什么不能 ping 通!

中间路由器B配置

Router#sh run
Building configuration..

Current configuration : 590 bytes
!

version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption 
!

hostname Router
!

!
!

!
!

ipv6 unicast-routing
!

!
!

!
!

!
!

!
!

!
spanning-tree mode pvst
!

!
!

!
interface FastEthernet0/0
no  ip address
duplex auto
speed auto
ipv6 address 2001:DB6:3C4D:1::1/64  
ipv6 enable
!   

interface FastEthernet0/1
no ip address
duplex auto
speed auto
ipv6 address 2001:DB6:3C4D:2::1/64
ipv6 enable   
! 

interface Vlan1
no ip address
shutdown
!

ip classless
!

!
!

!
!

!
!

line con 0
!  

line aux 0
!

line vty 0 4
login
!

!
!

end

为什么路由器A和C不能ping通?

感谢您的回答,我禁用了直接连接接口的一个静态路由,它仍然只能 ping 其直接连接的邻居,当我尝试从路由器 C 到路由器 b 时,甚至无法 ping 路由器 B 到路由器 A 的远程出口接口,这里我提供了配置更改后路由器 C 的 sh run 输出

Building configuration...

Current configuration : 588 bytes
! 
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
! 
ipv6 unicast-routing 
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address autoconfig
ipv6 enable
!
interface FastEthernet0/1
 no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
 no ip address
shutdown  
!
ip classless
!
ipv6 route 2001:DB6:3C4D:1::/64 FastEthernet0/0
!
!

C 上的路由表

Router#sh ipv6 route 
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
   U - Per-user Static route, M - MIPv6
   I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
   O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
   ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
   D - EIGRP, EX - EIGRP external
S   2001:DB6:3C4D:1::/64 [1/0]
 via ::, FastEthernet0/0
C   2001:DB6:3C4D:2::/64 [0/0]
 via ::, FastEthernet0/0
L   2001:DB6:3C4D:2:290:CFF:FE49:7601/128 [0/0]
 via ::, FastEthernet0/0
L   FF00::/8 [0/0]
 via ::, Null0

答案1

如果我正确理解了配置,您既没有告诉路由器 A,也没有告诉路由器 C,它们应该使用路由器 B 来访问相应的其他网络(via 2001:DB6:3C4D:1::1via 2001:DB6:3C4D:2::1而不是via ::)。事实上,您配置了 A 和 C两个都网络2001:DB6:3C4D:1::/64及其2001:DB6:3C4D:2::/64各自的本地链接。

相关内容