If the egress range is the same ip/network as in local network, it might cause route issue. For example, there is a local network 192.168.1.0/24, while another remote network is also setup as 192.168.1.0/24 and it's added in the egress range. In this situation, there are two routes, pointing to the same destination 192.168.1.0/24, but via different interface/gateway (one local interface, another netmaker interface).
Workaround: (As less as possible setting two private network the same address)
1
Setup different route metric
The lower metric one is working actively.
2
Add specific host IPs to the egress range
If only few hosts need to be egressed, add the host IP(s) in the egress range rather than the whole network address.
3
Prefer network address for the remote network and add local hosts individually
If there are only a few hosts in the local network but many in the remote network, set the remote network address in the egress range and then add the local hosts one by one to the route.
Issue 2 description:
If there is another host in the same local network set up as an egressGW and the local network is added in the egress range, there might be conflict in the routes. For example, there are two hosts in a network: host A is set up as egressGW and the local network address is set up as egress range. Then on host B, an egress route will be added. In host B's route table, there will be duplicated routes — the same destination but with different route.
Workaround:
The active route depends on the route metric. Change the metric for the route on the local interface to be lower than the metric of the other route. This ensures traffic is routed via the local interface rather than the netmaker interface.