Post
by nobody12 » Mon Feb 15, 2021 5:43 pm
The behaviour you experience is normal.
Why:
Each device in a network segment has an IP address in the local Network, The Network Segment has a network adress which is made of a network address and a subnet mask. Example 192.168.10.0/24 (range is 192.168.10.1 to 192.168.10.255. All devices inside this Segment assume that any address within this network are directly accessible. When the device with the ip 192.168.10.1 wants to talk to 192.168.10.10 it makes an arp request: who has 192.168.10.10? and it gets the answer that a specific MAC adresse has this address. Then it can talk to 192.168.10.10 because it learned the MAC.
Now when it wants to talk to a device outside of the local network example to 192.168.20.1/24, it has two choices:
It first looks up its local routing table if there is a match for a route to 192.168.20.0/24. If there is a match it sends the packet to this router, hoping the router will then be able to deliver the packet to the destination. Second, If there is no match in the local routing table it sends the packet to the default gateway example 192.168.10.254, and again hopes this route will be able to deliver it to the destination. If the router is directly connected to the destination network it will be able to deliver the packet, if not the router will again try to lookup in its own routing table, check for a mach, if not it will deliver the packet to its own default gateway.
If you send a packet somewhere out of your local netowrk there is no information inside the packet how it can be sent back to the originator. It is left to destination device to discover a route back (this also makes sense because not always the path the packet did go is the best/right path to send an answer, there might be a shorter/better way back).
Therefore, both sender and receiver have either to know about a route where to send, or they rely on the default route.
If the Softether Router would be the same device as the default gateway, you would not need to create a seperate route, instead you just send the packet to the default router, Iti will know how to deliver the packet. But here you have a default router (gateway to the internet) and you have a second router, the L3 switch which is somewhere in your local network. Unless you create a static route in your default gateways routing table the router will send the packet in the internet - the wrong path.
So, either add the route to the default gateways routing table or to the routing table of any device in the local network (dhcp is able to distribute classless routes), but adding the route to the default gateway is a much better choice. Also, the default gateway can send a icmp redirect packet to the sender, so following packets (if the sender accepts icmp redirects) go to the correct address which will improve performance.
That is from my point of view why the behaviour ist normal: if you put more then one router inside of the network at least the default gateway needs to know all other local routing entries, otherwise you will have a problem.
This is not the fault of softether but the result of a network design with more then one router.