How to set up static routing on the router? The NAS printer under the sub-router cannot be found. I will add one and it will work.
I did this by myself. The main router at home is TP-LINK XDR6088, the management address 192.168.1.1 ; I connected another Mercury D191G to the study room. Since the network port in the study room only has one cable, I plugged the WAN port of the D191G into the main router LAN port to save trouble and let it have a separate section in the study room. 192.168.2.1 . As a result, the main network computer could not ping the QNAP NAS and a Brother DCP-1618W printer in the study.
The computer webpage and WeChat are all normal, except for the two devices in the study room. At first I thought there was an IP conflict, and then I thought the printer was not turned on. Finally, I discovered that the problem was not with the device at all.: The main router only knows 192.168.1.x, and 192.168.2.x is a "place not on the map" to it.
Don’t rush to add rules first, think clearly about how to connect them.
When there are two routers at home, there are three common connection methods, and the results are completely different.
- LAN port to LAN port : Turn off DHCP on the secondary router and change the management address to the same network segment as the primary router. It is equivalent to a switch with WiFi. The devices all use 192.168.1.x, so of course they can communicate with each other.
- WAN port to LAN port, secondary router in routing mode : That's how I am now. There is a separate section of 192.168.2.x under the sub-router. Devices under the main router cannot access it by default.
- WAN port to LAN port, the sub-router turns on AP mode : Many new routers have this option, which automatically degrades into a switch with one click and allows mutual access.
My mistake at the time was that I used D191G as a secondary router and expected the main network device to find it directly like a switch. Who dials the WAN port and the LAN port and sends the address? I'm not sure about this. What is the difference between the WAN port and the LAN port of the router? I have mentioned it before. If you are connecting two routers for the first time, reading that article first will save you a lot of detours.
For those who have already connected to a sub-router and don’t want to move the NAS printer, there is a way to save it, which is the static route below.
The routing table looks at "where to go, how big the range is, and who to give it to.”
It was the first time I heard about static routing, and I thought it was very advanced. In fact, you think of the main router as the community guard: It recognizes the 192.168.1.x package and sends it directly. ; Unknown packets will be thrown out from the default route. Now it doesn't recognize 192.168.2.x, so it naturally throws it to the operator and disappears into the sea.
Static routing is just to add a sentence to the gatekeeper.: “go 192.168.2.0 Leave this piece to me 192.168.1.2 this. ”There are three columns here. Just make sure they match up when filling out the form.:
| field | effect | In my example, fill in |
| Target network segment/destination network | Which one do you want to visit? | 192.168.2.0 |
| subnet mask | How big is this area? | 255.255.255.0 |
| Next hop/gateway | Who should I give the bag to and then deliver it? | 192.168.1.2 |
The most confusing thing here is“ 192.168.2.0 ”This 0. It does not represent a specific device, but rather 192.168.2.1 arrive 192.168.2.254 The entire paragraph is framed. mask 255.255.255.0 It means that only the first three and the last one are viewed casually. These are the same as cross-network access to company printers. What does subnet mask mean? Here, I talked about the pitfalls I encountered when using a printer.
How to fill in the main router background
Take the TP-LINK new interface as an example, log in 192.168.1.1 , find "Routing Settings" → "Static Routing". Click Add and fill in the four items in order:
- destination network : 192.168.2.0
- subnet mask : 255.255.255.0
- next hop : 192.168.1.2
- interface : LAN, or select "Auto" if there is "Auto"
here 192.168.1.2 It is the WAN port address of D191G on the main router side. I don’t know which address it has now. Go to the “Connected Devices” or “DHCP Client” of the main router and look for “Mercury” or check the last six digits of the MAC. Don’t just copy my numbers. If the WAN port of D191G changes IP every time it is restarted, go to the main router and bind it with an IP and MAC. Otherwise, the next time the router is restarted, the rules will be exposed again. This binding operation is the same as when I fixed the IP for the NAS. What does router DHCP mean? There are explanations of address pools and leases, just take a look if you forget.
After saving, I pinged the mainnet computer 192.168.2.1 , the first pass is the sub-router itself ; Then ping the NAS in the study room 192.168.2.88 , also passed. Since the printer belongs to Brother, I used a computer browser to enter its IP address and entered the Web management page to confirm that it could be opened. It only took three minutes, but it took me a whole night.
Three wrong places were filled in, and I stepped on them one by one.
The first one is "fill in the next hop as the LAN address of the sub-router". Some people will take it for granted 192.168.2.1 , looks like the house number of a router, but the main router cannot reach the 2.1 section at all, which is equivalent to asking the doorman to hand over the file to a building it does not recognize. The correct thing is to fill in the WAN address of the sub-router on the side of the main router, which is what I have here. 192.168.1.2 .
The second one is "only the rules are added to the sub-router, and the main router is not changed." I spent a long time digging around in D191G at the beginning, and found that as a home router, the static routing entry of D191G is either deeply hidden or not at all. When accessing the study from the main network, the first hurdle to pass is the main router, and rules must be added to it. The one set up in the sub-router is mostly used for "study to access the main network in turn".
The third one is "Forgot to turn off the firewall of the sub-router/disable ping". Some routers do not respond to pings from the WAN port by default, but normal NAS access and printer ports may not be blocked. If you can't ping after adding the rules, don't doubt the static routing yet. Use your computer to directly open the NAS's web address and try it. If it can be turned on, it means that the route has been connected, but the device has turned off the ICMP response and can continue to access it as usual. I finally confirmed it by opening the NAS backend. The ping failed but the webpage could be opened, indicating that the rules had actually taken effect. ; If you are really worried, you can temporarily turn off Windows Firewall and test again, and you can basically rule out that the device is not returning packets. It is really necessary to completely divide the TV box, NAS and main network into regions. That is another topic. What does router VLAN mean? I spent 60 yuan to buy a switch to build a wall, which is more ruthless than static routing.
When should you use static routing and when should you not bother with it?
I keep this static route at home because the NAS in the study needs to run background synchronization, the printer needs to be shared by the whole family, and the D191G happens to be placed in the study as a WiFi supplementary point. These three things are stacked together. It is easiest to add a rule to the main router.
But if you just want the devices under the two routers to be able to find each other, and there is no reason to "retain two network segments", I would recommend changing directly to AP mode or LAN to LAN, and changing the sub-router management address to 192.168.1.2 , turn off its DHCP. In this way, the whole house uses the same 192.168.1.x, and there is no need to manually add rules for screencasting, printers, and NAS. The pitfalls of changing the connection method are What does routing table mean? It is also found in the sister scene. Despite the professional name, the actual meaning is "one less layer of routing and one less layer of trouble."
Static routing is more suitable for these types of: There are indeed two network segments at home, and the sub-router cannot be changed to the AP. ; I connected to the company's VPN or bypass router and only want a certain address to bypass another device. ; Or the main router is a soft route, and you are willing to precisely control which traffic takes which route. It is enough for an ordinary family to add one, so don’t be intimidated by the name.
I divided this operation into five steps
If you are too lazy to read the above, just follow this order.:
- First confirm that the two routers are connected as sub-router, and there is indeed a separate network segment under the sub-router.
- Go to the "Connected Devices" of the main router and write down the IP obtained by the WAN port of the secondary router, for example 192.168.1.2 .
- The main router background finds the static route, and the destination network fills in the sub-routing network segment and mask. 255.255.255.0 , fill in the IP address just now for the next hop.
- Bind a fixed IP to the WAN port of the secondary router to prevent the address from changing after it restarts.
- Ping the sub-router management address to verify, and then access the NAS/printer to confirm that the service can be passed.
My most valuable experience this time is just one sentence: The device cannot be found. First check whether they are not on the same map at all. Static routing is to repair the map, not the equipment. Filling in the three columns of the rules correctly is much faster than reinstalling the network cable, IP, and printer one by one.
By the way, I also restarted both the primary router and the secondary router because I was worried that the rules would not take effect. In fact, most home routers take effect immediately after saving, without restarting. ; If it still doesn't work after waiting for half a minute, it's not too late to restart. This sequence of "wait for half a minute and then restart" is much more stable than cutting off the power and restarting, and will lessen the delay in using the Internet for other people at home.
