- 论坛徽章:
- 0
|
A主机上设定ipv6地址:2001:da8:2077::9402/64
[root@localhost ~]# ip -f inet6 addr add 2001:da8:2077::9402/64 dev eth0
[root@localhost ~]# ip -f inet6 addr
1: lo: <LOOPBACK,UP> mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qlen 1000
inet6 2001:da8:2077::9402/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::211:5bff:febd:846e/64 scope link
valid_lft forever preferred_lft forever
同一私网的地址的路由和global地址的路由都应该是已经有了:
[root@localhost ~]# ip -f inet6 route
2001:da8:2077::/64 dev eth0 metric 256 expires 2133432sec mtu 1500 advmss 1440 metric10 64
fe80::/64 dev eth0 metric 256 expires 2133028sec mtu 1500 advmss 1440 metric10 64
ff00::/8 dev eth0 metric 256 expires 2133028sec mtu 1500 advmss 1440 metric10 1
default dev eth0 metric 256 expires 2133218sec mtu 1500 advmss 1440 metric10 64
[root@localhost ~]# route -A inet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
::1/128 * U 0 97 2 lo
2001:da8:2077::9402/128 * U 0 0 2 lo
2001:da8:2077::/64 * U 256 0 0 eth0
fe80::211:5bff:febd:846e/128 * U 0 22 2 lo
fe80::/64 * U 256 0 0 eth0
ff00::/8 * U 256 0 0 eth0
*/0 * UC 256 1 0 eth0
ff00::/8 * U 256 0 0 eth0
*/0 * U 256 0 0 eth0
B主机上设定ipv6地址:2001:da8:2077::9403/64:
linux:~ # ip -f inet6 addr add 2001:da8:2077::9403/64 dev eth0
linux:~ # ip -f inet6 addr
1: lo: <LOOPBACK,UP> mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qlen 1000
inet6 2001:da8:2077::9403/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::20c:76ff:fedc:2776/64 scope link
valid_lft forever preferred_lft forever
4: vmnet8: <BROADCAST,MULTICAST,UP> mtu 1500 qlen 1000
inet6 fe80::250:56ff:fec0:8/64 scope link
valid_lft forever preferred_lft forever
5: vmnet1: <BROADCAST,MULTICAST,UP> mtu 1500 qlen 1000
inet6 fe80::250:56ff:fec0:1/64 scope link
valid_lft forever preferred_lft forever
同一私网的地址的路由和global地址的路由,也都应该是已经有了:
linux:~ # ip -f inet6 route
2001:da8:2077::/64 dev eth0 metric 256 mtu 1500 advmss 1440 fragtimeout 64
fe80::/64 dev eth0 metric 256 mtu 1500 advmss 1440 fragtimeout 64
fe80::/64 dev vmnet8 metric 256 mtu 1500 advmss 1440 fragtimeout 64
fe80::/64 dev vmnet1 metric 256 mtu 1500 advmss 1440 fragtimeout 64
ff00::/8 dev eth0 metric 256 mtu 1500 advmss 1440 fragtimeout 1
ff00::/8 dev vmnet8 metric 256 mtu 1500 advmss 1440 fragtimeout 1
ff00::/8 dev vmnet1 metric 256 mtu 1500 advmss 1440 fragtimeout 1
default dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 fragtimeout 64
default dev vmnet8 proto kernel metric 256 mtu 1500 advmss 1440 fragtimeout 64
default dev vmnet1 proto kernel metric 256 mtu 1500 advmss 1440 fragtimeout 64
unreachable default dev lo proto none metric -1 error -101 fragtimeout 255
linux:~ # route -A inet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
::1/128 :: U 0 610 0 lo
2001:da8:2077::9403/128 :: U 0 0 0 lo
2001:da8:2077::/64 :: U 256 0 0 eth0
fe80::20c:76ff:fedc:2776/128 :: U 0 0 0 lo
fe80::250:56ff:fec0:1/128 :: U 0 0 0 lo
fe80::250:56ff:fec0:8/128 :: U 0 0 0 lo
fe80::/64 :: U 256 0 0 eth0
fe80::/64 :: U 256 0 0 vmnet8
fe80::/64 :: U 256 0 0 vmnet1
ff00::/8 :: U 256 0 0 eth0
ff00::/8 :: U 256 0 0 vmnet8
ff00::/8 :: U 256 0 0 vmnet1
::/0 :: UD 256 0 0 eth0
::/0 :: UD 256 0 0 vmnet8
::/0 :: UD 256 0 0 vmnet1
此时,从A主机ping主机B的global地址,就是无法到达:
[root@localhost ~]# ping6 -I eth0 2001:da8:2077::9403
PING 2001:da8:2077::9403(2001:da8:2077::9403) from 2001:da8:2077::9402 eth0: 56 data bytes
From ::1 icmp_seq=1 Destination unreachable: Address unreachable
From ::1 icmp_seq=2 Destination unreachable: Address unreachable
From ::1 icmp_seq=3 Destination unreachable: Address unreachable
在主机A,ping主机B的link私网地址,还是无法到达:
[root@localhost ~]# ping6 -I eth0 fe80::20c:76ff:fedc:2776
PING fe80::20c:76ff:fedc:2776(fe80::20c:76ff:fedc:2776) from fe80::211:5bff:febd:846e eth0: 56 data bytes
From ::1 icmp_seq=1 Destination unreachable: Address unreachable
From ::1 icmp_seq=2 Destination unreachable: Address unreachable
From ::1 icmp_seq=3 Destination unreachable: Address unreachable
主机A与主机B连到同一个交换机,不明白怎么回事?
附:traceroute6结果:
从A主机traceroute到B主机:
[root@localhost ~]# traceroute6 -i eth0 2001:da8:2077::9403
traceroute to 2001:da8:2077::9403 (2001:da8:2077::9403) from 2001:da8:2077::9402, 30 hops max, 16 byte packets
1 ::1 (::1) 3000.43 ms !H 2999.77 ms !H 3000.49 ms !H
[root@localhost ~]#
------------------------------------------
traceroute到主机B的私网地址:
[root@localhost ~]# traceroute6 -i eth0 fe80::20c:76ff:fedc:2776
traceroute to fe80::20c:76ff:fedc:2776 (fe80::20c:76ff:fedc:2776) from fe80::211:5bff:febd:846e, 30 hops max, 16 byte packets
1 ::1 (::1) 2999.63 ms !H 2999.77 ms !H 3000.48 ms !H
[root@localhost ~]#
[ 本帖最后由 dreamping 于 2008-6-11 12:26 编辑 ] |
|