× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Default route on ReadyNAS 4220

pstoev
Tutor

Default route on ReadyNAS 4220

Hello there, I am trying to set a default route using statically configured eth1 interface. I am in Networks - Routes menu and I enter 0.0.0.0 for IP and 0.0.0.0 for subnet mask. Subnet mask does not accept such entry. What should I do ?readynas.PNG

Model: ReadyNAS-4200v2|ReadyNAS 4200v2
Message 1 of 23

Accepted Solutions
pstoev
Tutor

Re: Default route on ReadyNAS 4220

until I have physical access to the box, this is my temprary solution. Apperatnly though it will not work if the ReadyNAS is rebooted

 

root@Netgear:/# route delete default gw 0.0.0.0 eth0
root@Netgear:/# route add default gw 192.168.100.1 eth1

View solution in original post

Message 18 of 23

All Replies
StephenB
Guru

Re: Default route on ReadyNAS 4220

Normally you use 255.255.255.255 as the subnet mask for IP address 0.0.0.0

 

Also, you appear to have configured Google's public DNS server (8.8.8.8) as a static route - which of course won't work.

 

What are you trying to accomplish?  Wouldn't it be simpler to just remove the second ethernet connection?

 

 

Message 2 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

StephenB - thank you for the response, I will try that. But just to be preceise, using 0.0.0.0/32 is not normal. Industry standard says:

 

"The default route in Internet Protocol Version 4 (IPv4) is designated as the zero-address 0.0.0.0/0 in CIDR notation"

 

I will now remove the 8.8.8.8/32 route - i was using it to test.

 

I am trying to get the ReadyNAS connect to the NTP servers which are factory specified to be "time-e.netgear.com" and which would not work without DNS...which would not work without default route or local DNS server which we dont have.

 

I cannot just remove second ethernet connection. This is a backup NFS appliance for several networks and so it needs to be connected to these networks.

Message 3 of 23
StephenB
Guru

Re: Default route on ReadyNAS 4220


@pstoev wrote:

StephenB - thank you for the response, I will try that. But just to be preceise, using 0.0.0.0/32 is not normal. Industry standard says:

 

"The default route in Internet Protocol Version 4 (IPv4) is designated as the zero-address 0.0.0.0/0 in CIDR notation"

 

Yeah, it might not work - (and could give you an unrouteable error).  if you need 0.0.0.0 with a 0.0.0.0 mask, then you might need to use ssh.

 

But I don't still understand the purpose for entering it.  Traffic that isn't sent to 192.168.100.x and isn't covered by another static route should be going to 192.168.100.1 anyway,. correct? 

 

 

 

Message 4 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

Ok here is the background:

 

eth0 - 172.30.1.5 IP is connected to the network to backup VMs on 172.30.1/24 network

eth1 - 192.168.100.50 is connected the network to backup VMs on 192.168.100/24 network AND 192.168.100.1 is the gateway out to internet

eth2 - 192.168.199.47 is connected the network to backup VMs on 192.168.199.24 network and 192.168.199.1 is the gateway to 192.168.99/24 network BUT NOT to internet

 

do you have a reference for ssh commands to set routes ? here is the current routing table

 

root@Netgear:/home/admin# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.30.1.1      0.0.0.0         UG        0 0          0 eth0
8.8.8.8         172.30.1.1      255.255.255.255 UGH       0 0          0 eth0
172.30.1.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0
172.30.1.1      0.0.0.0         255.255.255.255 UH        0 0          0 eth0
192.168.99.0    192.168.199.1   255.255.255.0   UG        0 0          0 eth2
192.168.100.0   0.0.0.0         255.255.255.0   U         0 0          0 eth1
192.168.100.1   0.0.0.0         255.255.255.255 UH        0 0          0 eth1
192.168.199.0   0.0.0.0         255.255.255.0   U         0 0          0 eth2

Message 5 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220

Typically the only reason to use a static route is to access a different LOCAL subnet that is DIFFERENT than the subnet of the assigned ip.

 

example;

nas ip 192.168.1.22/24 (255.255.255.0)

default gateway 192.168.1.1

dns 192.168.1.1

 

static route 10.10.10.0/24 (the other local network you are trying to reach)

gateway 192.168.1.9 (the other ROUTER that is connected to both networks- 192.168.1.x and 10.10.10.x)

 

default route does not really have anything to do wit name resolution.

 

In order for your nas to resolve dns names, it needs a working dns server in the ethernet settings (not the default route settings).

 

Message 6 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

TeknoJnky - thanks for your response and I understand what you are saying...but how would the NAS get to 8.8.8.8 DNS or say 4.2.2.1 DNS without a default route ? Also how would it get to Netgear site for automated fimrware download/update without default route ? Also how may it connect to the Netgear specified NTP servcers without default route ? Default Route is needed for any internet-bound traffic from Netgear and that is what I am trying to set. When I try to set 0.0.0.0/0.0.0.0 - the ReadyNAS WebUI does not accept 0.0.0.0 as a subnet mask.

Message 7 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220

Ok, I have my nas NIC's bonded, so I can't currently see if each ETH has its own DNS server and/or gateway, but I would expect this;

 

go to network settings, find settings for ETH1

 

--- eth1 - 192.168.100.50 is connected the network to backup VMs on 192.168.100/24 network AND 192.168.100.1 is the gateway out to internet ---

 

ETH1 should have the gateway set to 192.168.100.1, and it should have a DNS server IP entered in the dns section.

 

The DNS server can either be a public (ie 8.8.8.8 or 1.1.1.1 etc) or it can be a private dns that can still resolve public ips (ie typcially the gateway can act as a dns resolver- 192.168.100.1).

 

hope that helps.

 

 

Also- you can have multiple dns servers, so if the gateway acts only as LOCAL dns resolver, you can add a 2nd dns for the public ip resolution.

 

 

also2- googles dns server 8.8.8.8 is neither a gateway or static route or local ip, so you will want to remove that from any other settings other than DNS on ETH1.

 

Message 8 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220

@pstoev 

I think your confusion stems from misunderstanding the difference between Default GATEWAY and static routes.

 

The default gateway (as defined in the applicable ETH settings) *is* the default route for that subnet.

 

There can be no internet access without a default gateway.

 

 

 a static route is used for secondary gateways (ie routers) that route between multiple local subnets (that the default gateway does not know about).

 

 

 

Message 9 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

@TeknoJnky

 

Here is the definition of Default Route:

 

In computer networking, the default route is a setting on a computer that defines the packet forwarding rule to use when no specific route can be determined for a given Internet Protocol (IP) destination address. All packets for destinations not established in the routing table are sent via the default route.

 

 

Given this...how do you set default route in ReadyNAS to connect to, for example, Amazon Cloud Storage server with IP of 54.122.77.83

Message 10 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220


@pstoev wrote:

Given this...how do you set default route in ReadyNAS to connect to, for example, Amazon Cloud Storage server with IP of 54.122.77.83


I think your also confusing a default route with a VPN.

 

The answer to your question directly is to set your ETH1 DEFAULT GATEWAY to 192.168.100.1

 

192.168.100.1 you stated as being the gateway out to the internet.

Message 11 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

@TeknoJnky No VPN ...public open server...just any public IP on the internet, I am only using it as an example to explain that even having ETH1 DEFAULT GATEWAY to 192.168.100.1 ReadyNAS does not go out to Internet for anything through ETH1. not for DNS, not for NTP, not for PING. It appears it thinks that ETH0's "owns" the default route, as per the route table previously posted. I was hoping that setting a default route 0/0 with gateway 192.168.100.1 will change that behaviour.

 

 

Message 12 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220

Message 13 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220


@pstoev wrote:

@TeknoJnky No VPN ...public open server...just any public IP on the internet, I am only using it as an example to explain that even having ETH1 DEFAULT GATEWAY to 192.168.100.1 ReadyNAS does not go out to Internet for anything through ETH1. not for DNS, not for NTP, not for PING. It appears it thinks that ETH0's "owns" the default route, as per the route table previously posted. I was hoping that setting a default route 0/0 with gateway 192.168.100.1 will change that behaviour.

 

 


 

ETH0 should not have a gateway, or you can possibly try putting 192.168.100.1 in ETH0 default gateway section.

Message 14 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220

I do not know if the readynas prioritizes ETH0 over ETH1 default gateways. If so, then really the main solution is to put the INTERNET subnet on ETH0.

 

In other words switch the network settings for ETH0 and ETH1 then switch cables.

 

Message 15 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

@TeknoJnky Well that is probably the solution to try although a stupid one.

Message 16 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220


@pstoev wrote:

Ok here is the background:

 

eth0 - 172.30.1.5 IP is connected to the network to backup VMs on 172.30.1/24 network

eth1 - 192.168.100.50 is connected the network to backup VMs on 192.168.100/24 network AND 192.168.100.1 is the gateway out to internet

eth2 - 192.168.199.47 is connected the network to backup VMs on 192.168.199.24 network and 192.168.199.1 is the gateway to 192.168.99/24 network BUT NOT to internet

 

 

Like I said, try removing any default gateway from ETH0 first and see if that works.

 

Ok, reading above, here is what I would suggest, swapping eth0 and eth1;

 

 

eth0 - 192.168.100.50 is connected the network to backup VMs on 192.168.100/24 network AND 192.168.100.1 is the gateway out to internet

eth1 - 172.30.1.5 IP is connected to the network to backup VMs on 172.30.1/24 network

eth2 - 192.168.199.47 is connected the network to backup VMs on 192.168.199.24 network and 192.168.199.1 is the gateway to 192.168.99/24 network BUT NOT to internet

SO,

 

ETH0 goes to 192.168.100.x  and the internet (default gateway 192.168.100.1)

 

ETH1 goes to 172.30.1.x ONLY (default gateway BLANK)

 

ETH2 goes to 192.168.199.x AND has access to 192.168.99.x (via default gateway 192.168.199.1)

 

 

eth2 is a little more complicated and perhaps could use a static route, but should not be required.

 

example static route: 192.168.99.0 255.255.255.0 > gateway 192.168.199.1 > adapter eth2

 

I would suspect explicitly defining this static route would allow for quicker access to 192.168.99.x instead of having to flow down through eth0 then eth1, before finally finding the way out through eth2.

 

 

Message 17 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

until I have physical access to the box, this is my temprary solution. Apperatnly though it will not work if the ReadyNAS is rebooted

 

root@Netgear:/# route delete default gw 0.0.0.0 eth0
root@Netgear:/# route add default gw 192.168.100.1 eth1

Message 18 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220

can you confirm or did you try setting ETH0 default gateway to BLANK, or alternatively to 192.168.100.1  ???

 

Message 19 of 23
pstoev
Tutor

Re: Default route on ReadyNAS 4220

tried eth0 default gateway set to blank - that did not work, it was still thinking eth0 is the way out to the internet.

 

tired eth0 default gateway set to 192.168.100.1 - that did not work

Message 20 of 23
StephenB
Guru

Re: Default route on ReadyNAS 4220


@pstoev wrote:

Ok here is the background:

 

eth0 - 172.30.1.5 IP is connected to the network to backup VMs on 172.30.1/24 network

eth1 - 192.168.100.50 is connected the network to backup VMs on 192.168.100/24 network AND 192.168.100.1 is the gateway out to internet

eth2 - 192.168.199.47 is connected the network to backup VMs on 192.168.199.24 network and 192.168.199.1 is the gateway to 192.168.99/24 network BUT NOT to internet

 


Try deleting all your static routes, and then let us know what is broken.

 

I think all your local addressing should just work.  It's conceivable that internet addressing will fail, but if it works correctly then there's no reason to set up any of these.

Message 21 of 23
StephenB
Guru

Re: Default route on ReadyNAS 4220


@pstoev wrote:

until I have physical access to the box, this is my temprary solution. Apperatnly though it will not work if the ReadyNAS is rebooted

 

root@Netgear:/# route delete default gw 0.0.0.0 eth0
root@Netgear:/# route add default gw 192.168.100.1 eth1


Another option would have been to set the default metrics so that eth1 would win out over eth0 and eth2.

But swapping eth0 and eth1 is the way to make sure it survives reboots.

 

FWIW, Netgear could provide a more complete GUI for this.

Message 22 of 23
TeknoJnky
Hero

Re: Default route on ReadyNAS 4220

Yeah, Metric is configurable in windows, but I don't think it is in the GUI for os 6.

 

I'm sure some google-foo would determine if and howto modify NIC metric via linux. In case you were not already aware, os 6 uses debian jessie, so if researching try to find info related to that version (different versions of debian have different ways of doing things).

 

 

Metric determines exactly what order of precedence a network interface has.

 

for example, wifi vs ethernet. I believe windows typically attempts to determine metric by priortizing faster link speeds.

 

Message 23 of 23
Top Contributors
Discussion stats
  • 22 replies
  • 4757 views
  • 1 kudo
  • 3 in conversation
Announcements