ipv6的任播地址 的作用就是选择离自己开销最小的路由,在6to4中继路由中,任播是一个很好的应用 ,可以让我们选择一个最优的中继。

 

其实在IPV4中也有任播地址 ,192.88.99.0/24就是IANA分配的一个6to4任播前缀,专门用于IPV6的6to4自动隧道。

一般所定义 的是到达最近的6to4中继 的地址 是192.88.99.1,而192.88.99.1对应的IPV6 6to4地址 是:

2002:C058:6301::

 

 
    
  1. R1: 
  2.  
  3. interface Serial0/0 
  4.  ip address 12.1.1.1 255.255.255.0 
  5.  serial restart-delay 0 
  6. interface Serial0/1 
  7.  ip address 14.1.1.1 255.255.255.0 
  8.  serial restart-delay 0 
  9. interface Serial0/2 
  10.  ip address 17.1.1.1 255.255.255.0 
  11.  serial restart-delay 0 
  12.  
  13. router ospf 100 
  14.  router-id 1.1.1.1 
  15.  log-adjacency-changes 
  16.  network 12.1.1.1 0.0.0.0 area 0 
  17.  network 14.1.1.1 0.0.0.0 area 0 
  18.  network 16.1.1.1 0.0.0.0 area 0 
  19.  network 17.1.1.1 0.0.0.0 area 0 

 

 
    
  1. R2: 
  2.  
  3. ipv6 unicast-routing 
  4.  
  5. interface Tunnel0 
  6.  no ip address 
  7.  no ip redirects 
  8.  ipv6 address 2002:C058:6301::/64 anycast 
  9.  ipv6 unnumbered Serial0/1 
  10.  tunnel source Serial0/0 
  11.  tunnel mode ipv6ip 6to4 
  12. interface Serial0/0 
  13.  ip address 192.88.99.1 255.255.255.0 secondary 
  14.  ip address 12.1.1.2 255.255.255.0 
  15.  serial restart-delay 0 
  16. interface Serial0/1 
  17.  no ip address 
  18.  ipv6 address 2001:22::2/64 
  19.  ipv6 address FE80::2 link-local 
  20.  ipv6 ospf 100 area 0 
  21.  serial restart-delay 0 
  22.  
  23. router ospf 100 
  24.  router-id 2.2.2.2 
  25.  log-adjacency-changes 
  26.  network 12.1.1.2 0.0.0.0 area 0 
  27.  network 192.88.99.1 0.0.0.0 area 0 
  28. ip http server 
  29. no ip http secure-server 
  30. ipv6 route 2002::/16 Tunnel0 
  31. ipv6 router ospf 100 
  32.  router-id 2.2.2.2 
  33.  log-adjacency-changes 
  34.  default-information originate always 

 

 
    
  1. R3: 
  2.  
  3. ipv6 unicast-routing 
  4.  
  5. interface Tunnel0 
  6.  no ip address 
  7.  no ip redirects 
  8.  ipv6 address 2002:C058:6301::/64 anycast 
  9.  ipv6 unnumbered Serial0/1 
  10.  tunnel source Serial0/0 
  11.  tunnel mode ipv6ip 6to4 
  12. interface Serial0/0 
  13.  ip address 192.88.99.1 255.255.255.0 secondary 
  14.  ip address 34.1.1.3 255.255.255.0 
  15.  serial restart-delay 0 
  16. interface Serial0/1 
  17.  no ip address 
  18.  ipv6 address 2001:33::3/64 
  19.  ipv6 address FE80::3 link-local 
  20.  ipv6 ospf 100 area 0 
  21.  serial restart-delay 0 
  22.  
  23. router ospf 100 
  24.  router-id 3.3.3.3 
  25.  log-adjacency-changes 
  26.  network 34.1.1.3 0.0.0.0 area 0 
  27.  network 192.88.99.1 0.0.0.0 area 0 
  28.  
  29. ipv6 route 2002::/16 Tunnel0 
  30. ipv6 router ospf 100 
  31.  router-id 3.3.3.3 
  32.  log-adjacency-changes 
  33.  default-information originate always 

 

 
    
  1. R4: 
  2.  
  3. interface Serial0/0 
  4.  ip address 14.1.1.4 255.255.255.0 
  5.  serial restart-delay 0 
  6. !          
  7. interface Serial0/1 
  8.  ip address 34.1.1.4 255.255.255.0 
  9.  serial restart-delay 0 
  10.  
  11. router ospf 100 
  12.  router-id 4.4.4.4 
  13.  log-adjacency-changes 
  14.  network 0.0.0.0 255.255.255.255 area 0 

 

 
    
  1. R5: 
  2.  
  3. ipv6 unicast-routing 
  4.  
  5. interface Serial0/0 
  6.  no ip address 
  7.  ipv6 address 2001:33::5/64 
  8.  ipv6 address FE80:33::5 link-local 
  9.  ipv6 ospf 100 area 0 
  10.  serial restart-delay 0 
  11. interface Serial0/1 
  12.  no ip address 
  13.  ipv6 address 2001:22::5/64 
  14.  ipv6 address FE80:22::5 link-local 
  15.  ipv6 ospf 100 area 0 
  16.  serial restart-delay 0 
  17.  
  18. ipv6 router ospf 100 
  19.  router-id 5.5.5.5 
  20.  log-adjacency-changes 

 

 
    
  1. R6: 
  2.  
  3. interface Loopback0 
  4.  no ip address 
  5.  ipv6 address 2002:1101:106:66::116/128 
  6.  
  7. interface Tunnel0 
  8.  no ip address 
  9.  no ip redirects 
  10.  ipv6 unnumbered Loopback0 
  11.  tunnel source Serial0/0 
  12.  tunnel mode ipv6ip 6to4 
  13. interface Serial0/0 
  14.  ip address 17.1.1.6 255.255.255.0 
  15.  serial restart-delay 0 
  16.  
  17. router ospf 100 
  18.  router-id 6.6.6.6 
  19.  log-adjacency-changes 
  20.  network 16.1.1.6 0.0.0.0 area 0 
  21.  network 17.1.1.6 0.0.0.0 area 0 
  22. ip http server 
  23. no ip http secure-server 
  24. ipv6 route 2002::/16 Tunnel0 
  25. ipv6 route ::/0 2002:C058:6301::