How do I connect router A and router B through a physical network cable? Is it a LAN interface to a LAN interface?
Hello everyone, there is A problem with multi-broadband access to build a LAN, please help to see
The actual situation is as follows: I have two broadband A and B access to the house, Under them, different optical cats(A and B) are connected to different routers(A and B). Router A has PC1, while router B has PC2 and PC3. I want PC1 to ping through PC2 and PC3, but at the same time, I want to ensure that PC1 uses broadband A. PC2 and PC3 use broadband B
Condition :
Router A's WAN port is 192.168.1.1, its LAN port is 192.168.3.1 and 192.168.3.0 is the routing address
Router B's WAN port is 192.168.2.1 and its LAN port is 192. 168.4.1 Start 192.168.4.0 is the routing address
The ip address of PC1 is 192.168.3.1
The ip address of PC2 is 192.168.4.1
The ip address of PC3 is 192.168.4.2
There is no network cable between router A and router B Answer it. I don't know how to connect it, After the connection is complete, I want to ping each other through static routes.
Write route -p add 192.168.4.1 255.255.255.0 192.168.2.1 and route -p add 192.168.4.2 on router A 255.255.255.0 192.168.2.1
route -p add 192.168.3.1 255.255.255.0 192.168.1.1
Is the statement that I write to add a static route correct? If not, what's wrong with it?
Then I don't have network cable between routers or between optical cats, I don't know how to connect PC1 to ping PC2 and PC3
Please have a look, thank you
0 Answer
How do I connect router A and router B through a physical network cable? Is it a LAN interface to a LAN interface?
the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > if you want to pass the physical wiring routers A and B, The LAN port(local area network port) of one router is usually connected to the WAN port(wide area network port) of another router.
Specifically, if both router A and router B have multiple LAN interfaces and A WAN interface, you can connect one of the LAN interfaces of router A to the WAN interface of router B, or one of the LAN interfaces of router B to the WAN interface of router A. This allows two routers to be connected together to form a LAN.
Note that if you want to connect router A and Router B together, their IP addresses and subnet masks will also need to be configured accordingly to ensure that they are in the same subnet. For details about how to configure the router, see the user manual of the router or consult network technicians.
According to what you said, router A's WAN interface is connected to broadband A. Router A's LAN interface is connected to wireless router A's WAN interface. The LAN interface of wireless router A connects to the WAN interface of wireless router B, and the LAN interface of wireless router B connects to the WAN interface of router B. Therefore, broadband of router B is not used.
the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > hello, judging from the information you provide, you need to PC1 was achieved by static routing through A broadband access PC2 and PC3, Ensure that PC2 and PC3 use broadband B to access the Internet.
First you need to make sure that routers A and B can communicate with each other, since they are not connected together, you need to connect them in some way. One way to do this is to use A VPN, which is to build a VPN tunnel between routers A and B so that they are logically connected. You can configure OpenVPN or other VPN schemes on routers A and B.
About adding static routes, the two routing rules you added on router A are correct. However, on router B, it should be added to its WAN interface, not its LAN interface. Therefore, the correct command would be:
route -p add 192.168.3.1 mask 255.255.255.0 192.168.2.1
Route -p add 192.168.3.1 mask 255.255.255.0 192.168.2.1Setting up A VPN tunnel and using devices such as wireless Bridges to connect routers A and B require certain configuration and operation experience. Therefore, you are advised to familiarize yourself with relevant knowledge and exercise caution before performing this operation.
route -p add 192.168.4.2 255.255.255.0 192.168.2.1
Next, connect the network between router A and router B. This can be done using two TP-Link TL-WR841N wireless routers, in addition to a network cable. Connect the LAN port of router A to the WAN port of TP-Link TL-WR841N wireless router A, and then connect the LAN port of TP-Link TL-WR841N wireless router A to the WAN port of TP-Link TL-WR841N wireless router B. Finally, the LAN port of TP-Link TL-WR841N is connected to the WAN port of router B. As shown below:
Finally, you also need to add static routes on router B:
route -p add 192.168.3.1 255.255.255.0 192.168.1.1
In this way, the bridge between broadband A and broadband B is completed and static routes are added. Then PC1 can ping PC2 and PC3.
If the answer is helpful, please accept it.
这家伙很懒,什么都没留下...