No IPv6 with Asus RT-N56U

1,332

Your router appears to have successfully used IPv6 Router Discovery and Stateless Address Auto-Configuration (SLAAC) to get its own WAN IPv6 address. However, it appears that it was unsuccessful in using DHCP-PD, so it doesn't know what IPv6 prefix it should advertise to IPv6 clients on its "LAN" side. Without a separate IPv6 prefix for its LAN side, which the upstream network knows to route to its WAN interface, it can't act as a router between LAN and WAN.

The PD in DHCP-PD stands for "Prefix Delegation". It's a special use case of DHCP, where an IPv6 router can ask a DHCP server to delegate an IPv6 prefix for the router to use. An IPv6-capable ISP that uses DHCP-PD must make sure their DHCP server knows how to delegate prefixes to routers, and also knows how to notify the ISP's routing layer that a given prefix has been delegated to a given router, so that the ISP's route tables get updated and start forwarding traffic for that prefix to that router.

Your next steps would be to check with your ISP to see exactly what kind of native IPv6 service they provide. Are they really set up to do DHCP-PD? Or do they maybe expect you to manually request a prefix via their customer service website, and manually enter it into your router, rather than having it automatically delegated via DHCP-PD? Or maybe they don't support customers having their own IPv6 routers at all; maybe they just support individual IPv6 hosts, and not routers that route a whole prefix?

If they say DHCP-PD is supposed to work, you could set up a packet sniffer on the WAN side of your Asus router and capture its DHCP-PD attempts, and see if they're properly-formed, and if they get any responses from the ISP's DHCP servers, and if those responses are properly-formed.

Share:
1,332

Related videos on Youtube

Patrick Vellia
Author by

Patrick Vellia

Updated on September 18, 2022

Comments

  • Patrick Vellia
    Patrick Vellia over 1 year

    I am deriving from this tutorial, and I've gotten the Stimulus controller to work; however, the result is not rendering as expected.

    I am using this to update several select boxes, starting with country to filter the data in state_province one.

    in my _address.html.haml I have:

    .fieldset.border.border-dark.ps-4.pe-4.pt-4.mb-4
        = f.fields_for :address, Address.new do |a| 
            %div{data:{controller: "select-filter", select:{filter:{url: "#{filter_states_path}", form: a}} }}
                %legend Primary Address
    ...
    
                .form-floating.mb-4
                    = a.select :country_id, options_for_select(Country.all.collect { |c| [ "#{sanitize(c.unicode_flag)} #{c.name} (#{c.country_code})" , c.id] }), {prompt: "Choose One. . . "}, {class: "form-select form-select-lg border border-dark", required: true, data:{action: "select-filter#change"}}
                    = a.label :country_id, "Country"
    
    ...
    
                    .col-md-4.mb-4
                        = render "admin/addresses/state_province", a: a, states: states
    
    ...
    

    in my _state_province.html.haml, I am currently checking if states is NOT nil and if so, put a paragraph in there with "Hi you" as the text. Right now, Right now, states is NOT nil, and I've confirmed this with rails console by running the same query in there. Count returns 56 whi is the actual number of records.

    .form-floating{ data:{select:{filter:{target: "states"}}} }
        - if states.nil?
            %p Hi you
    
        -#= a.select :state_province_id, options_for_select(states.collect { |c| [ "#{c.code} #{c.name}", c.id] }), {prompt: "Choose one. . . "}, {class: "form-select form-select-lg border border-dark", required: true }
        -#= a.label :state_province_id, "State / Province"
    

    in my filter_states.html.haml, I have the following:

    = render "admin/addresses/state_province", a: @a, states: @states
    

    in my AddressesController I have the following:

    class Admin::AddressesController < ApplicationController
        def filter_states
            @states = StateProvince.where(country_id: params[:country]).all
            @a = params[:form]
        end
    end
    

    in my routes, I have:

    post 'filter_states', to: 'admin/addresses#filter_states'
      
    

    and in my select_filter_controller.js, I have:

    import { Controller } from "@hotwired/stimulus"
    
    export default class extends Controller {
      static targets = [ "states" ]
    
      change(event) {
        var form_var = this.data.get("form")
        fetch(this.data.get("url"), { 
          method: 'POST', 
          body: JSON.stringify( { country: [...event.target.selectedOptions].map(option => option.value), form: form_var }),
          credentials: "include",
          dataType: 'script',
          headers: {
            "X-CSRF-Token": getMetaValue("csrf-token"),
            "Content-Type": "application/json"
          },
        })
          .then(response => response.text())
          .then(html => {
            this.statesTarget.innerHTML = html
          })
      }
    }
    
    function getMetaValue(name) {
      const element = document.head.querySelector(`meta[name="${name}"]`)
      return element.getAttribute("content")
    }
    

    so a few things:

    1. When the Stimulus replaces _state_province.html.haml through the filter_states.html.haml, it renders the entire application.html.haml inside that small part of the window, instead of JUST the partial. Almost like an iframe for the whole application.

    2. It appears that I'm not passing the form's a variable into Stimulus and then to the controller and then back into the new partial (it works fine directly from _address, but when the content is replaced by filter_states, the "a" variable doesn't work). So I think that's where the private method error is coming from.

    Did I miss something here?

    Below is a screenshot of what the returned partial looks like Screenshot

    • Michael Hampton
      Michael Hampton about 10 years
      That's not the latest firmware, and it's known to have various IPv6 related bugs. Update to 3.0.0.4.374_2239.
  • Artem Pyanykh
    Artem Pyanykh about 10 years
    Thanks for your reply! And I would be very grateful if you could provide some additional details. Could you tell how you notice that my router wasn't successful with DHCP-PD? And I will surely ask my ISP about DHCP-PD, but what if they support only individual IPv6 hosts? Is there anything I can do in that case?
  • Sander Steffann
    Sander Steffann about 10 years
    Good answer! @Spiff: you should get the additional details from your ISP. For a router to be able to provide IPv6 to a LAN you need to get a prefix using DHCPv6-PD from the ISP or you have to manually configure the prefix. DHCPv6-PD is the normal way, and you should get something like a /48 or a /56 prefix delegated from them.
  • Spiff
    Spiff about 10 years
    @ArtemPyanykh Your router output showed it was set for "Native with DHCP-PD", but it didn't have a LAN prefix. A LAN prefix is like roughly the first half of an IPv6 address, ending in ::, followed by a prefix length like /64. Your router only showed the /64, which is probably its default expected prefix length, but it didn't show the actual prefix, so it probably didn't know it, because DHCP-PD probably failed. If your ISP only supports individual IPv6 hosts, then you need to find a way to make your Asus bridge IPv6 from WAN to LAN transparently instead of trying to be the IPv6 router.
  • Artem Pyanykh
    Artem Pyanykh about 10 years
    [you need to find a way to make your Asus bridge IPv6 from WAN to LAN transparently instead of trying to be the IPv6 router] @Spiff could you point to any materials on the subject?
  • Spiff
    Spiff about 10 years
    @ArtemPyanykh I can't really help any further as I'm not familiar with that box's capabilities. If you have Linux root shell access to that box, you might be able to configure a software bridge device between interfaces, and put a firewall filter rule that only lets IPv6's EtherType get to the bridge. But how to set that up is beyond the scope of this Question.
  • Artem Pyanykh
    Artem Pyanykh about 10 years
    @Spiff, ok I got it. Thank you anyway, for now I have some understanding of what is going on.
  • Sander Steffann
    Sander Steffann about 10 years
    @Spiff: you would be surprised... Today it is already common for a home router to have 3 interfaces: LAN, WAN, Guest. And companies like NXP produce chips for lamps based on 6lowpan, which needs at least a separate subnet, and having separate subnets per room is not that weird. IPv6 needs to provide for future developments, and if ISPs start with limiting the number of subnets they provide there is a big risk of killing innovation.
  • Michael Hampton
    Michael Hampton about 10 years
    @Spiff Best current practice seems to be to delegate /56 to residential end users, more or less, though that's not a hard number (RFC 6177). I for one would run out very quickly if I only had a /60, but I'm not most people...