2x Netclient in same subnet
1x Netmaker-server somewhere else
Netmaker-network servers is using 10.2.0.0/24
Both Netclients are connected over 10.1.0.0/24 (their local network).
Routing-table:
default via 10.1.0.1 dev eth0
10.1.0.0/24 dev eth0 proto kernel scope link
Problem:
Netclient-1 has 10.1.0.0/24 configured as egress, so other Peers can access the subnet. (Not 1 or 2 obviously, but a 3rd-one)
Netclient-2 cannot join network, because adding the egress-route from Netclient-1 fails as its already set.
Errors:
[#] ip -4 route add 10.1.0.0/24 dev nm-servers
RTNETLINK answers: File exists
Possible solutions:
When netclient has a local network with same CIDR as an egress configured in the netmaker-network, the local one should be preferred.
(=> the incoming route should be ignored)
Other problems could be a collision of networks
e.g. local network is 10.0.0.0/16, but egress configured is 10.0.0.0/24, then the egress would take precedence.
Maybe a warning should be displayed when a collision is detected.
Version
v0.16.1
What OS are you using?
Linux
Relevant log output
[..]
[#] ip -4 route add 10.2.0.254/32 dev nm-servers
[#] ip -4 route add 10.2.0.1/32 dev nm-servers
[#] ip -4 route add 10.1.0.0/24 dev nm-servers
RTNETLINK answers: File exists
[#] ip link delete dev nm-servers
file does not exist
[netclient] 2022-11-02 14:08:04 error installing: could not reliably create interface, please check wg installation and retry
[..]
Contact Details
No response
What happened?
Environment:
2x Netclient in same subnet 1x Netmaker-server somewhere else
Netmaker-network
servers
is using10.2.0.0/24
Both Netclients are connected over
10.1.0.0/24
(their local network). Routing-table:Problem:
Netclient-1 has
10.1.0.0/24
configured as egress, so other Peers can access the subnet. (Not 1 or 2 obviously, but a 3rd-one) Netclient-2 cannot join network, because adding the egress-route from Netclient-1 fails as its already set.Errors:
Possible solutions:
When netclient has a local network with same CIDR as an egress configured in the netmaker-network, the local one should be preferred. (=> the incoming route should be ignored)
Other problems could be a collision of networks e.g. local network is
10.0.0.0/16
, but egress configured is10.0.0.0/24
, then the egress would take precedence.Maybe a warning should be displayed when a collision is detected.
Version
v0.16.1
What OS are you using?
Linux
Relevant log output
Contributing guidelines