fakemanhk / openwrt-jp-ipoe

Configure OpenWRT to work with Japan NTT IPv6 service
132 stars 14 forks source link

GmoBB support: only ipv6 connectivity, ipv4 MAP rule is invalid #22

Closed LIII-XXII closed 1 year ago

LIII-XXII commented 1 year ago

Hello, I followed this guide and get ipv6 connectivity with map-e, but there are some differences and ipv4 isn't working with map-e:

Any tips? I'll check the reference and see if I can figure it out without the calculator.

LIII-XXII commented 1 year ago

If I understand well, I should probably set another 0 in the ip6prefix to have 64 bits fixed, I will try this later.

missing233 commented 1 year ago

You should at least check out how the ISP router works, either through packet capture or some other method. I got fooled by SoftBank once. They labeled it as MAP-E on their router, but they weren't using MAP-E tunnel at all.

LIII-XXII commented 1 year ago

I'm pretty confident it is map-e, because:

but I'm interested in trying that out, if just for troubleshooting / understanding what both routers do. Can you recommend some tools or some specific things to look for in the packet capture?

missing233 commented 1 year ago

I'm pretty confident it is map-e, because:

  • I get an ipv6 address via dhcp6 in openwrt
  • the ipv4 address I get with the NTT router matches the one the online calculator gives me based on the ipv6 address
  • the ports I can reach from outside on ipv4 (when using the NTT router) also match the port ranges that the map-e calculator gives
  • there's a lot of google hits in Japanese for gmo + map-e that discuss details for the exact same setup

but I'm interested in trying that out, if just for troubleshooting / understanding what both routers do. Can you recommend some tools or some specific things to look for in the packet capture?

You can use Wireshark or tcpdump to capture data packets.

LIII-XXII commented 1 year ago

I retried this and can now get ipv6 connectivity, and an ipv4 with map-e, however I'm unable to connect to anything using on the internet using ipv4 EDIT: after a few more hours of fiddling with it, I'm starting to think that the issue is somewhere else in the configuration of the openwrt router, I'll start from scratch again without using the web interface later

LIII-XXII commented 1 year ago

I finally got it to work. The issue was that there are some differences in dhcp6, so relay mode didn't work. I'll post my /etc/config/network here for future reference if anybody is interested in using openwrt with GmoBB.

missing233 commented 1 year ago

I finally got it to work. The issue was that there are some differences in dhcp6, so relay mode didn't work. I'll post my /etc/config/network here for future reference if anybody is interested in using openwrt with GmoBB.

May I ask if you are using FLET'S NEXT(1Gbps) or FLET'S CROSS(10Gbps)? If you are using the 10G line, I would be very grateful if you could share information on the DHCPv6.

LIII-XXII commented 1 year ago

it's 1G, but I expect that the settings would be the same

LIII-XXII commented 1 year ago

here are my settings with the public IP details replaced with 1234567891 digits:

the WAN interface is eth1, LAN is eth0:

https://openwrt.org/toh/buffalo/wzr-hp-ag300h

router

config interface 'loopback'
    option device 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd13:1234:5678::/48'

config interface 'wan6'
    option device 'eth1'
    option proto 'dhcpv6'
    option reqaddress 'try'
    option reqprefix 'auto'

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'eth0.1'

config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 3 4 0t'

config interface 'netmape'
    option proto 'map'
    option maptype 'map-e'
    option ipaddr '123.45.0.0'
    option ip4prefixlen '15'
    option ip6prefix '1234:50::'
    option ip6prefixlen '31'
    option ealen '25'
    option psidlen '8'
    option offset '4'
    option tunlink 'wan6'
    option mtu '1460'
    option legacymap '1'
    option encaplimit 'ignore'
    option peeraddr '1234:5600:789:100::64'
fakemanhk commented 1 year ago

here are my settings with the public IP details replaced with 1234567891 digits:

the WAN interface is eth1, LAN is eth0:

https://openwrt.org/toh/buffalo/wzr-hp-ag300h

router

config interface 'loopback'
    option device 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd13:1234:5678::/48'

config interface 'wan6'
    option device 'eth1'
    option proto 'dhcpv6'
    option reqaddress 'try'
    option reqprefix 'auto'

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'eth0.1'

config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 3 4 0t'

config interface 'netmape'
    option proto 'map'
    option maptype 'map-e'
    option ipaddr '123.45.0.0'
    option ip4prefixlen '15'
    option ip6prefix '1234:50::'
    option ip6prefixlen '31'
    option ealen '25'
    option psidlen '8'
    option offset '4'
    option tunlink 'wan6'
    option mtu '1460'
    option legacymap '1'
    option encaplimit 'ignore'
    option peeraddr '1234:5600:789:100::64'

Looks like you don't need to set a manual prefix on WAN6 interface when you are getting /60 from ISP? Anything else changed?

Also it's interesting that they are not giving you the /56 but /60, your plan comes with phone or not?

LIII-XXII commented 1 year ago

the wan6 part is pretty much stock from resetting the router, I haven't touched WAN settings besides deleting the ipv4 WAN zone. my plan comes with a phone. I did get /60 from the start (see the first post). it's not specified manually. I guess I could set it in settings but I think the dhcp6 picks that up automatically from the isp here.

fakemanhk commented 1 year ago

OK then probably for those signed up phone service, router will be able to get proper information for WAN interface, unlike mine, without phone service I have to manually put in the 64 bit prefix to WAN6 interface to make it work (it took me several months to figure out)

On Thu, Sep 21, 2023 at 11:11 AM Florian Castellane < @.***> wrote:

the wan6 part is pretty much stock from resetting the router. my plan comes with a phone. I did get /60 from the start (see the first post). it's not specified manually. I guess I could set it in settings but I think the dhcp6 picks that up automatically from the isp here.

— Reply to this email directly, view it on GitHub https://github.com/fakemanhk/openwrt-jp-ipoe/issues/22#issuecomment-1728662135, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFCR7WOFA4ZV567XSM775Z3X3OO3TANCNFSM6AAAAAA4RKKUAE . You are receiving this because you commented.Message ID: @.***>

LIII-XXII commented 1 year ago

I'm going to set up an ethernet (SIP?) phone on top of openwrt and configure it for 光電話, I'll give some pointers if I get it to work

missing233 commented 1 year ago

I'm going to set up an ethernet (SIP?) phone on top of openwrt and configure it for 光電話, I'll give some pointers if I get it to work

I've been using SoftBank Hikari 10G (FLET'S CROSS) and managed to get a /56 prefix even without the Hikari Denwa service. Not entirely sure, but does FLET'S HIKARI use RJ11 or RJ45 for their Hikari Denwa? Seems like there aren’t any openwrt compatible routers with RJ11 ports.

missing233 commented 1 year ago

it's 1G, but I expect that the settings would be the same

It's a bit different. FLET'S NEXT 1G has a DHCPv6 lifetime of 30 days, while FLET'S CROSS 10G has a lifetime of just 4 hours. My odhcp6c always loses connection after 8 hours when running on FLET'S CROSS. I'm looking for someone else using FLET'S CROSS 10G to see if this is a common issue.

LIII-XXII commented 1 year ago

does FLET'S HIKARI use RJ11 or RJ45 for their Hikari Denwa?

The NTT box uses RJ11, but SIP phones are RJ45 afaik, they run on the network... the OpenWRT side would probably use this package: https://openwrt.org/docs/guide-user/services/voip/asterisk

I'm looking for someone else using FLET'S CROSS 10G to see if this is a common issue.

I'm actually interested in 10G, but afaik there is no Openwrt router that supports the speed, let me know if you have hardware to recommend

missing233 commented 1 year ago

The NTT box uses RJ11, but SIP phones are RJ45 afaik, they run on the network... the OpenWRT side would probably use this package: https://openwrt.org/docs/guide-user/services/voip/asterisk

I'm looking for someone else using FLET'S CROSS 10G to see if this is a common issue.

I'm actually interested in 10G, but afaik there is no Openwrt router that supports the speed, let me know if you have hardware to recommend

From what I know, the Xiaomi 10000 router is the most affordable one running openwrt that comes with 1x 10GbE, 1x 10G SFP+, and 4x 2.5GbE. However, currently it can only unlock SSH and cannot run the full openwrt firmware; its official firmware only supports PPPoE. Additionally, a x86 server with X550T2 or X710DA2 is a good choice.

Regarding SIP phones, I noticed that the HGW has 2*RJ11 ports. Does this mean that Hikari Denwa requires RJ11? If so, it seems that there are no openwrt routers available for SIP phone.

fakemanhk commented 1 year ago

Puzzle IEI-M902 has 3 x 10GbE + 6 x 2.5GbE which already has official OpenWrt support (no WiFi).

Currently I got the second hand Buffalo WXR-5950AX12 which has 2 x 10GbE and will have 23.05 support soon.

On Fri, Sep 22, 2023, 12:21 PM missing @.***> wrote:

The NTT box uses RJ11, but SIP phones are RJ45 afaik, they run on the network... the OpenWRT side would probably use this package: https://openwrt.org/docs/guide-user/services/voip/asterisk

I'm looking for someone else using FLET'S CROSS 10G to see if this is a common issue.

I'm actually interested in 10G, but afaik there is no Openwrt router that supports the speed, let me know if you have hardware to recommend

From what I know, the Xiaomi 10000 router is the most affordable one running openwrt that comes with 1x 10GbE, 1x 10G SFP+, and 4x 2.5GbE. However, currently it can only unlock SSH and cannot run the full openwrt firmware; its official firmware only supports PPPoE. Additionally, a x86 server with X550T2 or X710DA2 is a good choice.

Regarding SIP phones, I noticed that the HGW has 2*RJ11 ports. Does this mean that Hikari Denwa requires RJ11? If so, it seems that there are no openwrt routers available for SIP phone.

— Reply to this email directly, view it on GitHub https://github.com/fakemanhk/openwrt-jp-ipoe/issues/22#issuecomment-1730748447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFCR7WLWLH3PG3AFMPJRKBTX3T73TANCNFSM6AAAAAA4RKKUAE . You are receiving this because you commented.Message ID: @.***>