Edge OS 开启 IPv6 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
luchengdst
V2EX    UBNT

Edge OS 开启 IPv6

  •  
  •   luchengdst 2022 年 2 月 19 日 3491 次点击
    这是一个创建于 1510 天前的主题,其中的信息可能已经有所发展或是发生改变。
    1. 使用 Wizards 生成配置,勾选 DHCPv6 PD


    2. 开启 IPv6
    interfaces / ethernet / eth0 / pppoe / 0 / ipv6 / enable

    3. 开启 mss
    3 条回复    2024-04-18 16:57:05 +08:00
    Autonomous
        1
    Autonomous  
       2022 年 6 月 5 日
    假设 WAN 口在 eth0 ,运营商给的前缀长度是 60 ,可以配成 DHCPv6-stateless ,记得把防火墙规则给写了:

    ```

    configure
    # Configure the PPPoE for IPv6(eth0):
    set interfaces ethernet eth0 pppoe 0 ipv6 enable
    set interfaces ethernet eth0 pppoe 0 ipv6 address autoconf
    set interfaces ethernet eth0 pppoe 0 ipv6 dup-addr-detect-transmits 1
    set interfaces ethernet eth0 pppoe 0 dhcpv6-pd pd 0 prefix-length /60
    set interfaces ethernet eth0 pppoe 0 dhcpv6-pd rapid-commit enable
    set interfaces ethernet eth0 pppoe 0 dhcpv6-pd prefix-only

    # Enable IPv6 DHCPv6-stateless on the LAN(switch0):
    set interfaces ethernet eth0 pppoe 0 dhcpv6-pd pd 0 interface switch0 host-address ::1
    set interfaces ethernet eth0 pppoe 0 dhcpv6-pd pd 0 interface switch0 prefix-id :0
    set interfaces ethernet eth0 pppoe 0 dhcpv6-pd pd 0 interface switch0 service dhcpv6-stateless

    # Enable IPv6 on switch0:
    set interfaces switch switch0 ipv6 dup-addr-detect-transmits 1
    set interfaces switch switch0 ipv6 router-advert cur-hop-limit 64
    set interfaces switch switch0 ipv6 router-advert link-mtu 0
    set interfaces switch switch0 ipv6 router-advert managed-flag false
    set interfaces switch switch0 ipv6 router-advert max-interval 600
    set interfaces switch switch0 ipv6 router-advert other-config-flag false
    set interfaces switch switch0 ipv6 router-advert prefix '::/64' autonomous-flag true
    set interfaces switch switch0 ipv6 router-advert prefix '::/64' on-link-flag true
    set interfaces switch switch0 ipv6 router-advert prefix '::/64' valid-lifetime 259200
    set interfaces switch switch0 ipv6 router-advert reachable-time 0
    set interfaces switch switch0 ipv6 router-advert retrans-timer 0
    set interfaces switch switch0 ipv6 router-advert send-advert true

    # create a policy for WAN->Router:
    set firewall ipv6-name WANv6_LOCAL default-action drop
    set firewall ipv6-name WANv6_LOCAL description 'Local network traffic'
    set firewall ipv6-name WANv6_LOCAL enable-default-log
    set firewall ipv6-name WANv6_LOCAL rule 10 action accept
    set firewall ipv6-name WANv6_LOCAL rule 10 description 'Allow established/related sessions'
    set firewall ipv6-name WANv6_LOCAL rule 10 state established enable
    set firewall ipv6-name WANv6_LOCAL rule 10 state related enable
    set firewall ipv6-name WANv6_LOCAL rule 20 action drop
    set firewall ipv6-name WANv6_LOCAL rule 20 description 'Drop invalid state'
    set firewall ipv6-name WANv6_LOCAL rule 20 state invalid enable
    set firewall ipv6-name WANv6_LOCAL rule 30 action accept
    set firewall ipv6-name WANv6_LOCAL rule 30 description 'Allow IPv6 icmp'
    set firewall ipv6-name WANv6_LOCAL rule 30 protocol icmpv6
    set firewall ipv6-name WANv6_LOCAL rule 40 action accept
    set firewall ipv6-name WANv6_LOCAL rule 40 description 'allow dhcpv6'
    set firewall ipv6-name WANv6_LOCAL rule 40 destination port 546
    set firewall ipv6-name WANv6_LOCAL rule 40 protocol udp
    set firewall ipv6-name WANv6_LOCAL rule 40 source port 547

    # create a policy for WAN->LAN Clients:
    set firewall ipv6-name WANv6_IN default-action drop
    set firewall ipv6-name WANv6_IN description 'WAN inbound traffic to the router'
    set firewall ipv6-name WANv6_IN enable-default-log
    set firewall ipv6-name WANv6_IN rule 10 action accept
    set firewall ipv6-name WANv6_IN rule 10 description 'Allow established/related sessions'
    set firewall ipv6-name WANv6_IN rule 10 state established enable
    set firewall ipv6-name WANv6_IN rule 10 state related enable
    set firewall ipv6-name WANv6_IN rule 20 action drop
    set firewall ipv6-name WANv6_IN rule 20 description 'Drop invalid state'
    set firewall ipv6-name WANv6_IN rule 20 state invalid enable
    set firewall ipv6-name WANv6_IN rule 30 action accept
    set firewall ipv6-name WANv6_IN rule 30 description 'Allow IPv6 icmp'
    set firewall ipv6-name WANv6_IN rule 30 protocol icmpv6
    set firewall ipv6-name WANv6_IN rule 40 action accept
    set firewall ipv6-name WANv6_IN rule 40 description 'allow dhcpv6'
    set firewall ipv6-name WANv6_IN rule 40 destination port 546
    set firewall ipv6-name WANv6_IN rule 40 protocol udp
    set firewall ipv6-name WANv6_IN rule 40 source port 547
    set firewall ipv6-receive-redirects disable
    set firewall ipv6-src-route disable
    set interfaces ethernet eth0 pppoe 0 firewall in ipv6-name WANv6_IN
    set interfaces ethernet eth0 pppoe 0 firewall local ipv6-name WANv6_LOCAL

    commit
    save
    exit


    ```
    letmefly
        2
    letmefly  
       2023 年 6 月 20 日
    这个帖子简洁!
    家里的移动宽带,也是差不多的配置,区别就是我还开了 interfaces / ethernet / eth0 / pppoe / 0 / ipv6 / address / autoconf ,不知道是不是多余了。

    单位里的电信宽带,基本上就是 2 楼的设置,但是会产生 n 多的临时地址。
    zq19890000
        3
    zq19890000  
       2024 年 4 月 18 日
    DHCP 模式可以开启 Ipv6 吗
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1111 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 25ms UTC 23:01 PVG 07:01 LAX 16:01 JFK 19:01
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86