I own an Archer D7 modem. I have recently switched from DSL to FTTH, so my ISP provided me with their own ONT (Huawei HG8245Q) with phone, Ethernet and Wifi ports (like if Wifi was a "port" ever). I have a Raspberry Pi that works as VPN gateway to a remote site.

With old setup, D7 (which I bought because of this) had static route to Raspberry, and forwarded the rest to the DSL port. The fiber modem allows me to disable DHCP if I like, but doesn't allow me to modify routing tables: the linked article is for a modem without final Q.

Currently I succeeded in disabling ONT DHCP, put D7 in same LAN as every device and enabled DHCP on it. However I had to tell D7 to use ONT as default gateway. Internet works. While the D7 has the routing information, no client will ever go to it to address the remote VLAN (I'd have to tell my phone a routing table).

I thought I could input a static route "" into the D7 through the ONT LAN address and keep remote VLAN via Raspberry LAN address, but D7 refuses to override the default route.+

This article shows that with D7 you can configure a static default gateway, but my control panel doesn't look that. The default gateway can only be a WAN interface in my case

I know I can use LAN1 port as WAN port and put D7 behind ONT, so that I have two levels of NAT. That is the answer if I don't find another way.

But I wanted to ask: how do I specify a static route on a D7 router to a device on my LAN? It will be very useful to divert guest network traffic via Raspberry Tor :-)

  • I understand that sometimes I overcomplicate the whole my life, but I just like to do complicated stuff – usr-local-ΕΨΗΕΛΩΝ May 26 '17 at 17:03
  • Static routes need not be default routes. Changing the default route from the WAN connection will disable your Internet access. You must apply a static route to a router (layer-3) interface, not an interface that is part of a switch (layer-2) in the router. – Ron Maupin May 26 '17 at 17:15

If possible, just add specific routes for your VLANs. You probably still want the ONT to be used as a gateway for the public Internet – so there are just three 'private' ranges to cover.


But let's say you really want to override the default gateway for every single thing.

The most specific route will be used, so a common trick is to divide the internet into two routes: and While somewhat ugly, this will always take priority over the "default" route.


If tnat's not accepted by your router, start at instead (luckily doesn't actually contain valid IP addresses so it can be omitted) – these will cover the whole lot:


If that's still not accepted by your router, spam it with /8 routes which cover everything from to


(Skip 127, that's loopback. You can stop before 224, that's where the multicast range starts.)

And if that doesn't work, then I'm sorry to inform you but your router is garbage.

  • The router is clever, won't accept :-) – usr-local-ΕΨΗΕΛΩΝ May 27 '17 at 0:31
  • Then it should accept See updated post. – user1686 May 27 '17 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.