美文网首页
双栈网络配置路由器的ipv6穿透

双栈网络配置路由器的ipv6穿透

作者: MiiW | 来源:发表于2016-03-20 22:47 被阅读2669次

    本教程测试过程基于Newifi+PandoraBox/ 小云系统V3.0。理论上 OpenWrt原生同样适用。

    修改路由器的软件源

    dest root /
    dest ram /tmp
    lists_dir ext /var/opkg-lists
    option overlay_root /overlay
    src/gz 14.09_base http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/base
    src/gz 14.09_telephony http://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7620/packages/telephony
    src/gz 14.09_packages http://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7620/packages/packages
    src/gz 14.09_routing http://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7620/packages/routing
    src/gz 14.09_management http://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7620/packages/management
    arch ralink 1
    arch all 2
    arch ramips_24kec 3
    

    注:软件源由于硬件配置不同的会有所区别,Newifi是MT7620方案,其他芯片方案的请移步以下两个网址自行匹配:

    OpenWrt中文网址 http://downloads.openwrt.org.cn/
    OpenWrt download area https://downloads.openwrt.org/

    配置Odhcpd

    • 软件包中更新并安装最新版本的odhcpd
    • 修改dhcp文件(文件路径:/etc/config/dhcp,不熟悉ssh的可以使用winscp修改)
    config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'
    
    config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'hybrid'
        option ra 'hybrid'
        option ndp 'hybrid'
        option ra_management '1'
    
    config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
    
    config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
    
    config dhcp 'wan6'
        option interface 'wan'
        option dhcpv6 'hybrid'
        option ra 'hybrid'
        option ndp 'hybrid'
        option master '1'
    

    修改后保存并重启路由器即可。

    后话

    配置后好像dns出了一些问题,在访问其他校内以.byr.cn或.bupt.edu.cn为后缀的网址显示dns错误,如果有大牛解决了这个DNS问题,可以分享一下思路。
    2018.9.9更新:后话所述问题已经解决
    https://www.jianshu.com/p/644378ce25e3

    相关文章

      网友评论

          本文标题:双栈网络配置路由器的ipv6穿透

          本文链接:https://www.haomeiwen.com/subject/vjlklttx.html