Can't access LAN device that I set static IP for

Hi me again. Just in case this is relevant, my ISP has me on an IPoE/CG-NAT system.

Thanks to you guys over the last month I got through the basic configuration of my router and have moved onto the next stage, setting up a handful of devices. The other day I hooked up a NAS and set it a static IPv4.

It worked that day and I got through some of the NAS's basic configuration accessing it from my laptop. But today I tried accessing it again and no dice. I assume I screwed something up in the configuration, but I'm not sure where to start. I tried both the static IP and tower.local, the DNS that Unraid sets up for you upon installation--it also worked the other day.

Here's a list of what I did and remember doing:

  • I confirmed both through OpenWrt and the NAS device's command line that the static IP I set the other day is still its IP address.
  • The NAS doesn't have wifi yet, so I connected the ethernet cable in all sorts of ways just to make sure this wasn't just an ethernet port problem.
  • I noticed tonight that under Network > Diagnostics, IPv4 Ping doesn't work while IPv6 does:
PING openwrt.org (64.226.122.113): 56 data bytes

--- openwrt.org ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
PING openwrt.org (2a03:b0c0:3:d0::1a51:c001): 56 data bytes
64 bytes from 2a03:b0c0:3:d0::1a51:c001: seq=0 ttl=54 time=226.305 ms
64 bytes from 2a03:b0c0:3:d0::1a51:c001: seq=1 ttl=54 time=222.381 ms
64 bytes from 2a03:b0c0:3:d0::1a51:c001: seq=2 ttl=54 time=222.091 ms
64 bytes from 2a03:b0c0:3:d0::1a51:c001: seq=3 ttl=54 time=225.956 ms
64 bytes from 2a03:b0c0:3:d0::1a51:c001: seq=4 ttl=54 time=222.159 ms

--- openwrt.org ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 222.091/223.778/226.305 ms

I'm happy to grab more code if it would help with troubleshooting, but I really don't know where to start :pensive_face: Thanks again to anyone who takes the time to help me out.

Please test some domain other than openwrt.org, OpenWrt's servers have been under constant attacks from ai companies and even more shady shady sources for the last few months and might not respond (because they're down, very slow or need to employ more extensive filtering). Meaning that any ping responses from *.openwrt.org need to be taken with a huge grain of salt, as the issues might be server-side and not with your client.

If I understand the issue correctly, you cannot reach your NAS from your computer -- is that correct?

Assuming that the two devices are on the same subnet, the router itself is not involved when devices are connecting to each other on the same L2 network. This would most likely point to an issue with the configuration of the NAS, not the router.

Just to be sure, though, we can take a look at your router's configuration:

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Ah, thanks for the insight. I tried Google and Amazon Japan but got the same result. Would that be an effect of CG-NAT, or is it more likely I configured something wrong?

My reply will be strictly about pinging IPv4 addresses (directly or indirectly via their fully qualified domain name) from either your router or a client behind your router (and not about anything regarding your NAS issues, as that's a whole other can of worms). cgNAT will not impede outgoing ping/ ping6 calls, nor the incoming responses, you can expect that to work regardless of cgNAT (or almost all other IPv4 transition mechanisms), because that's the most basic thing that needs to be done to keep access to IPv4-only servers working (and not inciting a riot from the ISP's paying customers).

But we are seeing ai companies and related enterprises going totally rampant in recent months (in particular, but already for the last 2-4 years), effectively attacking and DDoS'ing servers to a scale that can even bring down big projects and quite a few companies (at least temporarily), this makes the internet as a whole less stable and reliable than it had been before (bots have been a problem for the last two decades already, but it has really gone off the scales 'recently', since ai became the new gold rush). And as an opensource project with limited financial resources and few dedicated servers, without enterprise level protection schemes (proxies) in place, *.openwrt.org (like any opensource project) is particularly vulnerable to this.

1 Like

Thank you for your help. Here's the code:

root@OpenWrt:~# ubus call system board
{
	"kernel": "6.6.104",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 4",
	"model": "OpenWrt One",
	"board_name": "openwrt,one",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "24.10.3",
		"revision": "r28872-daca7c049b",
		"target": "mediatek/filogic",
		"description": "OpenWrt 24.10.3 r28872-daca7c049b",
		"builddate": "1758316778"
	}
}
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	list ipaddr '127.0.0.1/8'

config globals 'globals'
	option ula_prefix 'redacted'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ip6assign '60'
	list ipaddr 'redacted'

config interface 'wan'
	option device 'eth0'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth0'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option norelease '1'
	option sourcefilter '0'

config interface 'wan6mape'
	option proto 'map'
	option maptype 'map-e'
	option peeraddr 'redacted'
	option ipaddr 'redacted'
	option ip4prefixlen '15'
	option ip6prefix 'redacted'
	option ip6prefixlen '31'
	option ealen '25'
	option psidlen '8'
	option offset '4'
	option tunlink 'wan6'
	option legacymap '1'

config wireguard_wg0 # I thought I deleted this on Luci
	option public_key 'VGef1UpnWaf6Emaf7n0OkgpsihppSjN1/5GvaOXBog4='
	option private_key 'redacted'
	option description 'redacted'
	option route_allowed_ips '1'
	option endpoint_port '51820'
	option persistent_keepalive '25'
	list allowed_ips '10.0.0.2/32'

config wireguard_wg0 # I thought I deleted this on Luci
	option public_key 'QDHF0FKtXb3gRx0cf4vIU7NJXVtiNrDFLb88xaEos3g='
	option private_key 'redacted'
	option description 'macbook'
	option route_allowed_ips '1'
	option endpoint_port '51820'
	option persistent_keepalive '25'
	list allowed_ips '10.0.0.3/32'

config interface 'netbird1'
	option proto 'none'
	option device 'wt0'

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/18000000.wifi'
	option band '2g'
	option channel '6'
	option htmode 'HE40'
	option num_global_macaddr '7'
	option country 'JP'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'redacted'
	option encryption 'psk2'
	option key 'redacted'
	option wpa_disable_eapol_key_retries '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/18000000.wifi+1'
	option band '5g'
	option channel '48'
	option htmode 'HE160'
	option num_global_macaddr '7'
	option country 'JP'
	option cell_density '0'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'redacted'
	option encryption 'sae'
	option key 'redacted'
	option ocv '0'
	option wpa_disable_eapol_key_retries '1'

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '78'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
	option ra 'relay'
	option dhcpv6 'relay'
	option ndp 'relay'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config dhcp 'wan6'
	option interface 'wan6'
	option ignore '1'
	option master '1'
	option ra 'relay'
	option dhcpv6 'relay'
	option ndp 'relay'

config host
	option name 'nas'
	option dns '1'
	list mac 'redacted'
	option ip '192.168.29.15'
	option leasetime 'infinite'

root@OpenWrt:~# cat /etc/config/firewall

config defaults
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option synflood_protect '1'

config zone 'lan'
	option name 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'
	list network 'lan'
	list network 'netbird1'

config zone 'wan'
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'DROP'
	option masq '1'
	option mtu_fix '1'
	option masq6 '1'
	list masq_src 'redacted'
	list network 'wan'
	list network 'wan6'
	list network 'wan6mape'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port 'redacted'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option dest_port 'redacted'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port 'redacted'
	option proto 'udp'
	option target 'ACCEPT'

config rule 'wg' # I thought I deleted this on Luci
	option name 'Allow-WireGuard'
	option src 'wan'
	option dest_port 'redacted'
	option proto 'udp'
	option target 'ACCEPT'
	option enabled '0'

config rule # I thought I deleted this on Luci
	option src 'wan'
	option name 'WireGuard-incoming'
	list proto 'udp'
	option dest_port 'redacted'
	option target 'ACCEPT'
	option enabled '0'

It is not necessary to redact this information:

But critically, you appear to be missing the subnet mask (unless you have it defined using CIDR / notation).

You do have a few unusual IPv6 related things -- specifically things like IPv6 masquerading. Are these configured based on the ISP's documentation?

Thank youπŸ™‡β€β™‚οΈ

The IPv6 stuff I'm sure was me over the past several weeks. I'm not at home now so I can't confirm directly, but I think I have a box checked somewhere (Interface menu?) regarding masquerading. There's a little :warning: sign next to the box, but I didn't note in my documentation whether that was checked by default or if I did it myself. As a result, I've kept it checked. I really don't understand the implications, so if you know of the best practices in a general home network remote-access use-case I would appreciate it.

But would this have something to do with connecting to this NAS machine? As far as I know it only has an IPv4 address--when I boot the machine up it says IPv6 is "Not set".

Also, the NAS machine is running Unraid, which boots from a USB. If I disconnect that the machine would boot into Windows, which I might be able to use to fix whatever I've mucked up.

Again, sorry for the amateur questions, and thank you very much for your time.

In that case, you may want to reset and try using the defaults since it looks like your config wouldn't take long to rebuild. (obviously make a backup first).

But the lan interface is still a big question mark:

And, of course, you didn't specifically confirm/refute this:

1 Like

Ah sorry--That's correct, I was able to reach the NAS by entering its IP into a browser window on the day of initial installation, but yesterday--the second time I tried to access it--I was unable to.

I confirmed via command line on the NAS machine itself that its IPv4 was 192.168.29.15, and I set that IP address as static in OpenWrt using the NAS's MAC address. But even following that step, I was unable to access the device via my laptop's browser.

And as for the subnet mask, I don't clearly remember setting that (for the NAS) on either machine. Is that something I would be able to do now?
^Edit: Actually, I think I do remember doing that. Unraid requires it when you set the IP. I would have set it as usual, 255.255.255.0.

Let's make sure that we've got a precise description of what you've done...

  • Did you manually set the IP address on the NAS (as in a true static IP address, set in the network config of the NAS itself), or is the NAS set to DHCP client?
  • How is the NAS connected to the network? Is it directly plugged into eth1, or is there a downstream switch?
  • How is the laptop connected to the network? Ethernet or wifi?
  • What is the IP address of the laptop (and the subnet mask)?
  • What is the redacted line from the lan network interface (as I said previously, it's not necessary to redact that info).

I see that you have a DHCP reservation here:

I recommend removing the leasetime line.

There have been some recent debates about if the reservation needs to be within the DHCP pool or if it is okay for it to be outside the pool... currently, yours is outside the DHCP range. I'll try to run a quick experiment to see if this could be causing any of your issues.

My experiment shows that the DHCP reservation will still work if it is outside the DHCP pool.

2 Likes

I believe I manually set the IP address via the NAS's settings menu. I've attached a screenshot from a YouTube tutorial for context, but that's not my machine's configuration.

The NAS is connected to a managed switch, which is itself connected to my OpenWrt One. The OW1 is connected to an ONU, typical in Japan.

The laptop is typically connected to wifi, but yesterday I was connecting via ethernet, first via the switch and then directly to the NAS (which has two ethernet ports, one of which maintained its connection to the switch at all times).

The laptop gets assigned an IP from the router on a 12-hour lease so I assume it will be different when I get home tonight, but the subnet mask ought to be 255.255.255.0. At any rate, the address will be 192.168.29.x.

And here is the code I erroneously redacted:

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ip6assign '60'
	list ipaddr '192.168.29.1/24'

Again, thank you very much for your timeπŸ™‡β€β™‚οΈ

The unreacted lan interface looks fine. the CIDR notation (/24) specifies the subnet size, so the netmask is not required.

Your NAS config is theoretically fine if it's a variant of what is shown in the screen grab, but it's hard to know for sure.

All that said, there is nothing that the OpenWrt router can do to affect connectivity between your devices. Something is wrong. but I don't think it can be your router because of the fact that the laptop <-> NAS connections should be at L2.

With that in mind, you could use an unmanaged switch if you have one lying around, or just connect the NAS directly to the OpenWrt router and then connect your laptop via wifi... if they still can't connect to each other, the problem must be on the NAS (configuration or otherwise).

1 Like

Thank you so much for troubleshooting this with me. I'll do as you suggested, and if all else fails it seems like I should be able to un-set the IP from the NAS's command line.

Thanks again.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.