iT邦幫忙

0

請問 Fortigate 50E 如何設定IPv6 ( 使用中華電信 PPPoE )

CLF 2023-03-28 13:32:401988 瀏覽
  • 分享至 

  • xImage

請教版上 Fortinet 高手 :

https://ithelp.ithome.com.tw/upload/images/20230328/2004310548LpCIwbJh.png

如圖是我的家用網路架構..使用中華電信300M/150M 1個固定/7個浮動IP 上網
在IPv4 設定上都沒有問題 可以用 SDWAN 上網..
但是最近想把 IPv6 設定起來有找到網上2個文章
https://cychien.tw/wordpress/2021/05/12/%E4%BD%BF%E7%94%A8-fortigate-50e-%E8%A8%AD%E5%AE%9A-ipv6/

https://blah.cloud/networks/enabling-ipv6-dhcpv6-pd-pppoe-fortigate/

也依設定都下CLI指令設定上去了... 也重開機數次了..
IPv6政策 對外也全開了..

內部用戶設備都有取得 v6-IP , 但是就是出不去..
而由 Fortigate 50E 上可以用 exec ping6 ping得到外部公網主機...
內部用戶設備 可以用IPv6 ping 到 Fortigate Lan,及 wan1, wan2 的IP ..

https://ithelp.ithome.com.tw/upload/images/20230328/200431051yc0TyYXAR.png

以下是介面設定.. CLI

FG50E (interface) # show
config system interface
    edit "wan1"
        set vdom "root"
        set mode pppoe
        set allowaccess ping https fgfm
        set type physical
        set description "7浮動,1固定"
        set alias "中華300M 固定IP"
        set lldp-reception enable
        set lldp-transmission enable
        set estimated-upstream-bandwidth 160000
        set estimated-downstream-bandwidth 307200
        set role wan
        set snmp-index 1
        config ipv6
            set ip6-mode pppoe
            set ip6-allowaccess ping https
            set dhcp6-prefix-delegation enable
            set autoconf enable
        end
        set username "75@ip.hinet.net"
        set password ENC npD7URknDz4RCQ
        set dns-server-override disable
    next
    edit "wan2"
        set vdom "root"
        set mode pppoe
        set allowaccess ping https fgfm
        set type physical
        set description "浮動"
        set alias "中華300M 浮動IP"
        set lldp-reception enable
        set lldp-transmission enable
        set estimated-upstream-bandwidth 160000
        set estimated-downstream-bandwidth 307200
        set role wan
        set snmp-index 2
        config ipv6
            set ip6-mode pppoe
            set ip6-allowaccess ping https
            set dhcp6-prefix-delegation enable
            set autoconf enable
        end
        set ipunnumbered 192.168.1.5
        set username "75@hinet.net"
        set password ENC KqooRxVHcduc
        set defaultgw disable
        set dns-server-override disable
    next
    edit "modem"
        set vdom "root"
        set mode pppoe
        set type physical
        set snmp-index 3
    next
    edit "ssl.root"
        set vdom "root"
        set type tunnel
        set alias "SSL VPN interface"
        set snmp-index 4
    next
    edit "lan4"
        set vdom "root"
        set status down
        set type physical
        set device-identification enable
        set snmp-index 10
    next
    edit "lan5"
        set vdom "root"
        set status down
        set type physical
        set device-identification enable
        set snmp-index 9
    next
    edit "lan"
        set vdom "root"
        set ip 10.10.10.1 255.255.255.0
        set allowaccess ping https ssh http fgfm fabric
        set type hard-switch
        set stp enable
        set device-identification enable
        set lldp-reception enable
        set lldp-transmission enable
        set role lan
        set snmp-index 5
        config ipv6
            set ip6-address 2001:b011:9805:3c61::1/64
            set ip6-allowaccess ping https ssh http fgfm fabric
            set ip6-send-adv enable
            set ip6-other-flag enable
            config ip6-delegated-prefix-list
                edit 1
                    set upstream-interface "wan1"
                    set subnet ::/64
                next
            end
        end
    next
    edit "fortilink"
        set vdom "root"
        set fortilink enable
        set ip 169.254.1.1 255.255.255.0
        set allowaccess ping fabric
        set type hard-switch
        set lldp-reception enable
        set lldp-transmission enable
        set snmp-index 6
    next
    edit "PPPoE_Wan1_300M"
        set vdom "root"
        set mode pppoe
        set allowaccess ping https
        set status down
        set type tunnel
        set estimated-upstream-bandwidth 102400
        set estimated-downstream-bandwidth 307200
        set role wan
        set snmp-index 7
        config ipv6
            set ip6-mode dhcp
        end
        set dns-server-override disable
        set interface "wan1"
    next
    edit "EMAC VLAN"
        set vdom "root"
        set ip 10.199.47.40 255.255.255.0
        set type emac-vlan
        set snmp-index 8
        set secondary-IP enable
        config ipv6
            set ip6-mode dhcp
        end
        set interface "wan2"
    next
end

2個 WAN 使用 SD-WAN 的效果
https://ithelp.ithome.com.tw/upload/images/20230329/20043105L1hT71L4Gh.png

PC端的狀態如下 ..
可以取得V6IP , 可以 ping 到 lan , wan1 ,wan2
但是就是出不去..

C:\Windows\System32>ipconfig /all

Windows IP 設定

   主機名稱 . . . . . . . . . . . . .: PC001
   主要 DNS 尾碼  . . . . . . . . . .:
   節點類型 . . . . . . . . . . . . .: 混合式
   IP 路由啟用 . . . . . . . . . . . : 否
   WINS Proxy 啟用 . . . . . . . . . : 否
   DNS 尾碼搜尋清單 . . . . . . . . .: 


乙太網路卡 乙太網路 3:

   連線特定 DNS 尾碼 . . . . . . . . : 
   描述 . . . . . . . . . . . . . . .: Realtek PCIe 2.5GbE Family Controller #3
   實體位址 . . . . . . . . . . . . .: F0-2F-74-DB-E5-00
   DHCP 已啟用 . . . . . . . . . . . : 否
   自動設定啟用 . . . . . . . . . . .: 是
   IPv6 位址. . . . . . . . . . . . .: 2001:b011:9805:31bb::2(偏好選項)
   租用取得 . . . . . . . . . . . . .: 2023年3月27日 14:38:45
   租用到期 . . . . . . . . . . . . .: 2023年4月3日 12:59:34
   IPv6 位址. . . . . . . . . . . . .: 2001:b011:9805:31bb:785f:6917:502e:3a37(偏好選項)
   臨時 IPv6 位址. . . . . . . . . . : 2001:b011:9805:31bb:60e6:8f8f:7408:ee15(偏好選項)
   臨時 IPv6 位址. . . . . . . . . . : 2001:b011:9805:31bb:7410:7ace:a2c8:c637(已過時)
   臨時 IPv6 位址. . . . . . . . . . : 2001:b011:9805:31bb:a455:2880:9f94:8638(已過時)
   連結-本機 IPv6 位址 . . . . . . . : fe80::c127:1d0b:66ae:8ee1%9(偏好選項)
   IPv4 位址 . . . . . . . . . . . . : 10.10.10.7(偏好選項)
   子網路遮罩 . . . . . . . . . . . .: 255.255.255.0
   預設閘道 . . . . . . . . . . . . .: fe80::724c:a5ff:fe85:d8cb%9
                                       10.10.10.1
   DHCPv6 IAID . . . . . . . . . . . : 586166132
   DHCPv6 用戶端 DUID. . . . . . . . : 00-01-00-01-29-CC-E8-7F-70-9C-D1-13-90-2F
   DNS 伺服器 . . . . . . . . . . . .: 2001:b000:168::1
                                       2001:4860:4860::8888
                                       168.95.1.1
                                       8.8.8.8
   NetBIOS over Tcpip . . . . . . . .: 啟用


C:\Windows\System32>ping 2001:b011:9805:3817:724c:a5ff:fe85:d8c9

Ping 2001:b011:9805:3817:724c:a5ff:fe85:d8c9 (使用 32 位元組的資料):
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8c9: 時間<1ms
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8c9: 時間=1ms
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8c9: 時間<1ms
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8c9: 時間<1ms

2001:b011:9805:3817:724c:a5ff:fe85:d8c9 的 Ping 統計資料:
    封包: 已傳送 = 4,已收到 = 4, 已遺失 = 0 (0% 遺失),
大約的來回時間 (毫秒):
    最小值 = 0ms,最大值 = 1ms,平均 = 0ms

C:\Windows\System32>
C:\Windows\System32>ping 2001:b011:9805:3817:724c:a5ff:fe85:d8ca

Ping 2001:b011:9805:3817:724c:a5ff:fe85:d8ca (使用 32 位元組的資料):
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8ca: 時間<1ms
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8ca: 時間=1ms
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8ca: 時間=1ms
回覆自 2001:b011:9805:3817:724c:a5ff:fe85:d8ca: 時間<1ms

2001:b011:9805:3817:724c:a5ff:fe85:d8ca 的 Ping 統計資料:
    封包: 已傳送 = 4,已收到 = 4, 已遺失 = 0 (0% 遺失),
大約的來回時間 (毫秒):
    最小值 = 0ms,最大值 = 1ms,平均 = 0ms

C:\Windows\System32>
C:\Windows\System32>ping ipv6.google.com

Ping ipv6.l.google.com [2404:6800:4012::200e] (使用 32 位元組的資料):
要求等候逾時。
要求等候逾時。
要求等候逾時。
要求等候逾時。

2404:6800:4012::200e 的 Ping 統計資料:
    封包: 已傳送 = 4,已收到 = 0, 已遺失 = 4 (100% 遺失),

C:\Windows\System32>


下圖是IPV6 測試網站的結果.. 就是沒有ipv6連線
https://ithelp.ithome.com.tw/upload/images/20230330/200431056jlWwbpJ2O.png

可以看到 Fortigate 50E 有放行..
https://ithelp.ithome.com.tw/upload/images/20230330/20043105GaNbIDw07w.png

但是 就是路由到 Fortigate 50E LAN 就沒下文了...
https://ithelp.ithome.com.tw/upload/images/20230330/20043105dhZnMBrtVc.png

由 Fortigate 50E 是可以 ipv6 連外的...

Connected
 
FG50E # exec ping6 ipv6.google.com
PING ipv6.google.com(2404:6800:4012:3::200e) 56 data bytes
64 bytes from 2404:6800:4012:3::200e: icmp_seq=1 ttl=117 time=7.86 ms
64 bytes from 2404:6800:4012:3::200e: icmp_seq=2 ttl=117 time=7.20 ms
64 bytes from 2404:6800:4012:3::200e: icmp_seq=3 ttl=117 time=7.18 ms
64 bytes from 2404:6800:4012:3::200e: icmp_seq=4 ttl=117 time=7.29 ms
64 bytes from 2404:6800:4012:3::200e: icmp_seq=5 ttl=117 time=7.21 ms
 
--- ipv6.google.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss, time 4048ms
rtt min/avg/max/mdev = 7.181/7.352/7.864/0.258 ms
 
FG50E # show router 
 
FG50E # show router prefix-list6 
config router prefix-list6
end
 
FG50E # show router access-list6 
config router access-list6
end
 
FG50E #  

看更多先前的討論...收起先前的討論...
ipv6 reserved address 要設定
還有內部 DHCP V6 發的 IP 要確認是在 ipv6 reserved address 內
然後你所謂的固定IPV6 位址要寫上去,然後你不能讓WAN2 去MAP 這個 IP,要排除掉
還有就是 Fortigate 50E PPPOE 300M是跑不滿的 ... 而且容易一直重撥,你讓 WAN 2 跑同一條的 沒有意義,他也不好開 PPPOE REPLY,讓內部的電腦PPPOE出去
你如果要走PPPOE,你買錯型號 ...
然後同樣的那個固 1 IP 你也是PPPOE取得的 ... 搬板凳看戲
CLF iT邦新手 3 級 ‧ 2023-03-28 18:41:58 檢舉
我的 dhcp6 是設定relady 上游的 ipv6 這樣設定會有問題嗎?
wan1 & wan2 都是用 pppoe 取得不同 IP ..

FG50E # config system dhcp6 server

FG50E (server) # show
config system dhcp6 server
edit 1
set dns-service default
set interface "lan"
set upstream-interface "wan1"
set ip-mode delegated
next
end
多WAN路由的原因是什麼,你自己要先搞清楚,然後如果你的目的不是頻寬備援或是合併
那單一線路你會做的只有VLAN隔離,我是不知道你後面的LAN有沒有做隔離
例如 WAN1 跟 LAN1 是同一個VLAN,然後他們後面會有一堆要走固I出去的服務器
而WAN2跟LAN2是同一個VLAN,他們後面的只有上網的需求
大概是這樣的思考模式,你要先確認你是哪一種再說
接下來IPV6 也是有功用與私人的區隔,不是你WAN收到配發的V6 IP
你後面的全部都會有 V6 IP,因為FG50E 他是GW,不是BG,你內部的用戶端要有V6 IP,你要啟用 DHCP V6 設好 reserved address 的範圍跟遮罩,這樣你內部的用戶端才會有V6 IP,至於上只有 V6 IP 的網站,那是路由器本身的能力,只要啟用了 IPV6 就能轉發了,不需要特別設定, V4 跟 V6 本來就可以透過路由器去橋接
CLF iT邦新手 3 級 ‧ 2023-03-29 15:44:15 檢舉
2個 WAN 使用SD-WAN功能可以用不同的路由去連線大陸的主機,可以有加速回應, 快速恢復的功用。對我來說就是讓連線更穩定一些的作用。
如附圖..
先內部找個用戶端 https://test-ipv6.com/ 這邊測試再說吧
只要你能上 ipv6,這邊就可以檢測到的,如果不行,就是不行,你在看哪邊設定要調整的
我個人覺得lan 那邊的 ipv6 設定要看一下,感覺是lan 轉不出去
----- 3/31 更新 -----
建議找一台筆電直接接小烏龜,先不要上F50E,用筆電測試能不能正常通訊
請先測試固定IP在測試浮動IP,兩個都可以的話
在上 F50E 測試,當然先測試固定IP,在上浮動IP
大略就這樣
----- ----- ----- -----
CLF iT邦新手 3 級 ‧ 2023-03-30 21:14:48 檢舉
如更新的附圖..
Fortigate 說它有放行.. 但是 封包就是沒有回來.. 不知去那裡了..
a_yu iT邦新手 4 級 ‧ 2023-04-01 08:45:02 檢舉
你可以先用單條線路測試 先不要接滿
我猜是去回不同路
CLF iT邦新手 3 級 ‧ 2023-04-01 22:26:12 檢舉
我有試過在小烏龜後面直接 PPPOE 連入是可以用 IPV6 上網的..
接入 Fortigate 50E 如果打開透通模式 也是可以 IPV6 上網的..
也有試過停用 WAN2 只用 WAN1 ... 一樣是 IPV4 可以出去.. IPV6 出不去.. 而由50E 上測試 可以IPV6 出去...

看起來似乎問題出在 50E上面..只是真的看不出來是什麼設定有問題..
CLF iT邦新手 3 級 ‧ 2023-04-03 14:30:32 檢舉
這個問題又弄了2天後有了新的結果, 我將IPV6的政策改為 NAT 後..內部的V6-IP 就都可以連外了...
只是不明白 看了很多文件都說IPV6 就不需要用NAT 了..
我也想..都可以取得真實的V6-IP 了..用路由模式不就好了嗎...
結果是 NAT 可以出去.. 但是 路由模式出不去...
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答