...
- iterate over all the networks that a peer can be reached on and select the best local network
- The remote network with the highest priority is examined
- Network Rule
- The local network with the highest priority is selected
- Netword Network Rule
- The local NI with the highest priority is selected
- NID Rule
- The remote network with the highest priority is examined
- If the peer is a remote peer and has no local networks,
- then select the remote peer network with the highest priority
- Network Rule
- Select the highest priority remote peer_ni on the network selected
- NID Rule
- Now that the peer's network and NI are decided select the router in round robin from the source network and peer NI's preferred router list. The preferred list on the source network takes precedence.
- Router Rule
- then select the remote peer network with the highest priority
- Otherwise for local peers, select the peer_ni from the peer.
- highest priority peer NI is selected
- NID Rule
- Select the peer NI which has the local NI selected on its preferred list.
- NID Pair Rule
- highest priority peer NI is selected
...