Kurobeats

Zerotier Routing instead of Switching/Bridging

Feb 22nd, 2018
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. https://www.reddit.com/r/zerotier/comments/7ufhu8/ethernet_bridge_via_linux/
  2.  
  3. It sounds more like you are trying to route between the two networks. A bridge is more like a network extension via a switch; in this case a software one.
  4.  
  5. Short answer of how to do this:
  6. * Setup zerotier and local network interface
  7. * Turn on IP forwarding,
  8. * In /etc/sysctl.conf add,
  9. net.ipv4.conf.all.forwarding=1
  10. net.ipv4.conf.default.forwarding=1
  11. net.ipv6.conf.all.forwarding=1
  12. net.ipv6.conf.default.forwarding=1
  13. * Do a 'sysctl --system' or reboot the linux system
  14. * At the router for the LAN, add a route to point to the ZT network via the linux system
  15. * Via the zerotier control panel, add a route pointing to the LAN network via the linux system ip
  16. At this point anything on the zerotier network should be able to ping the LAN devices and the other way around as well.
  17.  
  18. Then that way you don't have to edit many devices and should be able to ping between the networks.
  19.  
  20. I do this currently between 3 networks in a similar fashion using ZT as the transport medium so to speak.
  21. Details: 3 networks: LAN, RemoteNET1, RemoteNET2. Each has a linux box that is configured roughly the same as above. Though they have a routing daemon installed which talks across the ZT network and tells the other boxes what networks are available. I then have the routers on each of the segments listen to the same routing protocol (as it is broadcasted on the ZT and local interface on each) and thus get dynamic routing in all three locations. I just skipped the ZT control panel route as I only have the 3 devices on it.
Add Comment
Please, Sign In to add comment