Preface
Next we will discuss a vswitch connection between home routers for Internet access. If some concepts are unclear, refer to my previous blog: [Home Router internal design] http://www.cnblogs.com/tanhangbo/p/4504560.html
Environment Construction
Prepare two routers. The Xiaomi router is wired to the Internet, and the tplink841n is not connected to any network cable. Prepare a laptop.
The management address/gateway of the Xiaomi router is 192.168.31.1.
The management address/gateway of tplink841n is 192.168.1.1.
Single vro
After I directly plug in the Xiaomi router, the DHCP process is first. Because the computer was originally connected to the 192.168.2.1/24 network segment, it requests the old IP address to be called by the Nak, then it started a DHCP.
Then there is the ARP process. The device asks the gateway's MAC address and then sends data.
Two Routers
When I connect the tplink841n LAN port to the LAN port of the Xiaomi router and connect the laptop to the LAN port of the tplink841n, the following occurs:
This is because two DHCP servers are scrambling to assign IP addresses to me, and finally tplink841n won. It may be because it is an early offer, so the computer first chooses it for request.
Plugging and unplugging the network cable is similar. In this case, the Xiaomi router is also excited because it still needs to go one more way.
Fixed IP Address
The following uses a fixed IP address for connection.
After the settings are complete, the computer gives up its IP address:
Then it will ask the gateway's MAC address, and the computer will be able to connect to the Internet.
At this time, the attempt to ping 192.168.1.1 has failed, but it is in the ARP table.
The default gateway in the current route table is 192.168.31.1. I guess the ping packet will be sent to this gateway address by default, and then sent to the Xiaomi router.
Disable DHCP server
Disabling the following option in tplink841n seems to invalidate its DHCP server function. The computer connects to tplink841n separately, and no DHCP interaction is seen. In this case, the computer will take the IP address directly from the Xiaomi router.
The same effect can be achieved by killing dnsmasq.
Conclusion
Two vro connection, if you want to be lazy to directly exchange the past, this may not work, or need to disable the DHCP server of the lower-level router, or set the network segment for LAN-WAN connection.
From Weizhi note (wiz)
Test the connection between home Routers