Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
tys
V2EX  ›  Linux

Linux 下 IPv6 优先

  •  
  •   tys · Mar 21, 2018 · 7861 views
  •   You need to sign in to view this topic
    This topic created in 3061 days ago, the information mentioned may be changed or developed.

    电脑同时获得 IPv4 地址和原生 IPv6 地址,请问 Linux 下如何设置 IPv6 优先?或者禁用 v4,只用 v6 ?

    Supplement 1  ·  Mar 21, 2018
    看了一下,系统默认的 dns 是 v4 的,试着改成 v6 的 dns 看看
    10 replies    2018-03-21 20:14:24 +08:00
    300
        1
    300  
       Mar 21, 2018 via Android
    把 V4 的 DNS 注释掉看看
    EricXuu
        2
    EricXuu  
       Mar 21, 2018
    我记得默认就是 ipv6 优先的啊,只要你的 dns 服务器能正确解析到 ipv6 的地址
    realpg
        3
    realpg  
       Mar 21, 2018
    如果你说网页 那么取决于你的浏览器
    对于 chrome 只要 ipv6 实际速度不慢延迟不高 首先会走 ipv6
    ovear
        4
    ovear  
       Mar 21, 2018
    默认就是 ipv6 优先,除非是那个啥隧道
    ironx
        5
    ironx  
       Mar 21, 2018 via Android
    一般开启了 ipv6 就是 6 优先
    mt7620
        6
    mt7620  
       Mar 21, 2018 via Android
    默认就是 ipv6 优先,修改 ipv4 优先在 /etc/gai.conf 里。
    zhjits
        7
    zhjits  
       Mar 21, 2018
    默认就是 v6 优先……
    先确定你的 DNS 能正确返回 AAAA 记录
    然后确定你的 IPv6 到目标服务器延迟比较小( happy eyeballs 了解一下)( @realpg 其实跟速度关系不大,只测量建立连接时间)
    realpg
        8
    realpg  
       Mar 21, 2018
    @zhjits #7
    chrome 有持续速度较低(延迟不高)的情况下 跳 IPV4 的机制 其他浏览器没观察过
    zhjits
        9
    zhjits  
       Mar 21, 2018
    @realpg 我这边是只要 v6 三四百毫秒里面连上了那么再慢也是走 v6 ……不是很科学
    realpg
        10
    realpg  
       Mar 21, 2018
    @zhjits #9
    我这 v6 只要不连国内 就快 延迟较低 所以没这个烦恼
    到是有时候 有些域名持续速度不行会掉回 V4
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2507 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 87ms · UTC 00:44 · PVG 08:44 · LAX 17:44 · JFK 20:44
    ♥ Do have faith in what you're doing.