Hi list, I have a question regarding routing in Tinc 1.1. Please consider the following example of a small network: • 5 nodes: A, B, C, D, E • C and E are nodes with very small bandwidth Meta connection graph: A – B – C – D │ │ └─ E ───────┘ Node configuration: • StrictSubnets = yes • AutoConnect = yes • B has Forwarding = internal, all other nodes have Forwarding = off All nodes can reach each other directly with UDP *except* A and D. Packets from A to D and vice versa have to be forwarded. Now I'd like to transfer data from A to D. Since C and E only have small bandwidth, I'd like to have data from A to D being forwarded by B directly to D (and not via C or E). How can I get this done? If I could somehow tell A to send packets for D always via B (and not via E): Would B try to directly connect to D in order to forward packets from A to D? Or would B forward A's packets for D to C (because of its meta connection to C)? Thanks in advance! cr0n
On Wed, Jan 10, 2018 at 11:29:22AM +0100, cr0n wrote:> Meta connection graph: > > A – B – C – D > │ │ > └─ E ───────┘ > > Node configuration: > > • StrictSubnets = yes > • AutoConnect = yes > • B has Forwarding = internal, all other nodes have Forwarding = off > > All nodes can reach each other directly with UDP *except* A and D. > Packets from A to D and vice versa have to be forwarded.Unfortunately, that is not going to work. The shortest path (in number of hops) between A and D is via E. If E has Forwarding = off, then no data will be forwarded and A and D will not be able to communicate with each other. I am afraid this currently is a hard limitation in tinc.> Now I'd like to transfer data from A to D. Since C and E only have small > bandwidth, I'd like to have data from A to D being forwarded by B > directly to D (and not via C or E). How can I get this done?The best way is to have D ConnectTo B instead of E. This way, B will be the best path.> If I could somehow tell A to send packets for D always via B (and not > via E): Would B try to directly connect to D in order to forward packets > from A to D? Or would B forward A's packets for D to C (because of its > meta connection to C)?If B can make a direct UDP connection to D, then it will use that, otherwise it will try to forward packets via C. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20180115/50acd3ce/attachment.sig>
Hi Guus, Thanks for the clarification.>> If I could somehow tell A to send packets for D always via B (and not >> via E): Would B try to directly connect to D in order to forward packets >> from A to D? Or would B forward A's packets for D to C (because of its >> meta connection to C)? > > If B can make a direct UDP connection to D, then it will use that, > otherwise it will try to forward packets via C.I changed my node configuration to establish a single meta connection between A and B with ConnectTo instead of AutoConnect (so no meta connection between A and E exist anymore). Since B is able to directly connect to D with UDP, all data packets from A to D are now forwarded by B directly to D. That is exactly what I wanted. Many Thanks! cr0n