V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hpclass
V2EX  ›  路由器

在 V2EX 潜伏很久了,第一次发帖,请 IPV6 相关大咖帮忙瞄一眼 pptpd+teredo 的问题

  •  
  •   hpclass · 2017-04-27 16:45:13 +08:00 · 3284 次点击
    这是一个创建于 2786 天前的主题,其中的信息可能已经有所发展或是发生改变。

    第一次发帖,求关注 这个应该归为路由器吧,, 直入正文吧,我用一台 Ubuntu 16.04 LTS 做为 PPTPD 服务器,上面装了 teredo 获取到 IPV6 地址,如图: 传不了图我给文字吧:

    teredo    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
    
              inet6 addr: 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79/32 Scope:Global
              
              inet6 addr: fe80::ffff:ffff:ffff/64 Scope:Link
              
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1
              
              RX packets:79 errors:0 dropped:0 overruns:0 frame:0
              
              TX packets:313 errors:0 dropped:0 overruns:0 carrier:0
              
              collisions:0 txqueuelen:500 
              
              RX bytes:8010 (8.0 KB)  TX bytes:24578 (24.5 KB)
              
              
    

    pptpd 服务器和 radvd,tdhcp 均已按照 google 配置好,以下是 ppp0 的情况:

    ppp0      Link encap:Point-to-Point Protocol  
    
              inet addr:192.168.213.1  P-t-P:192.168.213.3  Mask:255.255.255.255
              inet6 addr: fe80::2/10 Scope:Link
              inet6 addr: 2001:0:53aa:64c:f443:5fbb:93e3:f0e1/128 Scope:Global
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
              RX packets:1894 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2395 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3 
              RX bytes:248168 (248.1 KB)  TX bytes:873012 (873.0 KB)
    

    但是,在 ppp0 下面,ping fe80::2 是通的,其他非本机地址全部超时, 在 Ubuntu 上执行 tcpdump 抓包看到,ICMP6 能传递到 teredo 网卡上发出去,也有 ICMP6 的回应,可是 ppp0 却收不到回应,仿佛给 Ubuntu 吃了一样,以下是抓包数据

    root@ubuntu:/etc# tcpdump -t -vv ip6 -i teredo
     
     
     
    tcpdump: listening on teredo, link-type RAW (Raw IP), capture size 262144 bytes
    IP6 (hlim 63, next-header ICMPv6 (58) payload length: 40)
     
     
    2001:0:53aa:64c:1c11:e8c7:8bfe:ad79 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 622
    IP6 (hlim 63, next-header ICMPv6 (58) payload length: 40) 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 623
    IP6 (flowlabel 0x97b84, hlim 56, next-header ICMPv6 (58) payload length: 40) 2401:3800:4001:807::1018 > 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79: [icmp6 sum ok] ICMP6, echo reply, seq 623
    IP6 (flowlabel 0x97b84, hlim 56, next-header ICMPv6 (58) payload length: 40) 2401:3800:4001:807::1018 > 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79: [icmp6 sum ok] ICMP6, echo reply, seq 622
    IP6 (hlim 63, next-header ICMPv6 (58) payload length: 40) 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 624
    IP6 (flowlabel 0x97b84, hlim 56, next-header ICMPv6 (58) payload length: 40) 2401:3800:4001:807::1018 > 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79: [icmp6 sum ok] ICMP6, echo reply, seq 624
    IP6 (hlim 63, next-header ICMPv6 (58) payload length: 40) 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 625
    IP6 (flowlabel 0x97b84, hlim 56, next-header ICMPv6 (58) payload length: 40) 2401:3800:4001:807::1018 > 2001:0:53aa:64c:1c11:e8c7:8bfe:ad79: [icmp6 sum ok] ICMP6, echo reply, seq 625
    
    ^C
    
    root@ubuntu:/home/hp# tcpdump -t -i ppp0 -vv ip6
    
    
    tcpdump: listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
    IP6 (hlim 64, next-header ICMPv6 (58) payload length: 40) 213:0:53aa:64c:f443:5fbb:93e3:f0e1 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 622
    IP6 (hlim 64, next-header ICMPv6 (58) payload length: 40) 213:0:53aa:64c:f443:5fbb:93e3:f0e1 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 623
    IP6 (hlim 64, next-header ICMPv6 (58) payload length: 40) 213:0:53aa:64c:f443:5fbb:93e3:f0e1 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 624
    IP6 (hlim 64, next-header ICMPv6 (58) payload length: 40) 213:0:53aa:64c:f443:5fbb:93e3:f0e1 > 2401:3800:4001:807::1018: [icmp6 sum ok] ICMP6, echo request, seq 625
    ^C
    

    路由信息

    root@ubuntu:/home/hp# ip -6 route
    
    213:0:53aa:64c:f443:5fbb:93e3:f0e1 dev ppp0  proto kernel  metric 256  mtu 1400 pref medium
    2001:0:53aa:213:7463:dbeb:eead:ac94 dev ppp3  proto kernel  metric 256  mtu 1400 pref medium
    2001:0:53aa:213:ac16:729a:bdd8:225f dev ppp2  metric 1024  pref medium
    2001::/32 dev teredo  proto kernel  metric 256  pref medium
    fe80::/64 dev teredo  proto kernel  metric 256  pref medium
    fe80::/10 dev ppp0  metric 1  mtu 1400 pref medium
    fe80::/10 dev ppp0  proto kernel  metric 256  mtu 1400 pref medium
    default dev teredo  metric 1029  pref medium
    
    root@ubuntu:/home/hp# route -6
    Kernel IPv6 routing table
    Destination                    Next Hop                   Flag Met Ref Use If
    213:0:53aa:64c:f443:5fbb:93e3:f0e1/128 ::                         U    256 0     0 ppp0
    2001::/32                      ::                         U    256 5    22 teredo
    fe80::/64                      ::                         U    256 0     0 teredo
    fe80::/10                      ::                         U    1   1     7 ppp0
    fe80::/10                      ::                         U    256 0     0 ppp0
    ::/0                           ::                         U    1029 7    70 teredo
    ::/0                           ::                         !n   -1  1  2220 lo
    ::1/128                        ::                         Un   0   9    44 lo
    213:0:53aa:64c:f443:5fbb:93e3:f0e1/128 ::                         Un   0   2    21 lo
    2001::/128                     ::                         Un   0   1     0 lo
    fe80::/128                     ::                         Un   0   1     0 lo
    fe80::/128                     ::                         Un   0   1     0 lo
    fe80::/128                     ::                         Un   0   1     0 lo
    fe80::/128                     ::                         Un   0   1     0 lo
    fe80::/128                     ::                         Un   0   1     0 lo
    fe80::/128                     ::                         Un   0   1     0 lo
    fe80::2/128                    ::                         Un   0   1     0 lo
    fe80::2/128                    ::                         Un   0   1     0 lo
    fe80::ffff:ffff:ffff/128       ::                         Un   0   1     0 lo
    fe80::f443:5fbb:93e3:f0e1/128   ::                         Un   0   1     0 lo
    ff00::/8                       ::                         U    256 4  2096 ens39
    ff00::/8                       ::                         U    256 1  2267 ens33
    ff00::/8                       ::                         U    256 0     0 ens38
    ff00::/8                       ::                         U    256 0     0 teredo
    ff00::/8                       ::                         U    256 4    37 ppp0
    ::/0                           ::                         !n   -1  1  2220 lo
    
    

    另外,我试验过,在 Ubuntu 上 ping ppp0 的 Global 地址,响应时间是<1ms,ping ppp0 的 ipv4 是 2ms,我推测是 lo 把数据包吃了,,,求大佬们指点,搞这个玩意两星期了。。谷歌查的前几页都眼熟了,,

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5059 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 08:46 · PVG 16:46 · LAX 00:46 · JFK 03:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.