Route reflection, with ourselves as next hop
A route learned from one router of our AS went to no other (RFC 4271 §9.2.1), so every router needed a session with every other. A router at the end of a single link, with one session to its neighbour inside the AS, heard only of what that neighbour learned itself, and nothing of what the neighbour had from the routers behind it. A peer in our own AS can now be made a route reflector client (`route_reflector_client`, RFC 4456). What a client sends goes to all our routers; what the others send goes to the clients. A reflected route gets ORIGINATOR_ID (where it started, if it does not say) and our cluster ID at the front of CLUSTER_LIST; it is not sent back to the router it started at, nor round to a cluster it has been through, and one that comes back anyway is refused as "route reflected back to us". The cluster ID is the router ID unless `cluster_id` says otherwise. The two attributes are now decoded as such rather than kept as bytes, and are never sent to other networks. Unlike a standard reflector, this one is the next hop of what it reflects, as it is of everything it announces: there is no resolving a next hop that is not a neighbour, so a client reaches what lies behind another router through the reflector. Only peers in our own AS can be clients; the configuration refuses the setting for any other. Nothing changes in what other networks are told: Only to Customer marks go along with reflected routes, and every receiving session keeps its own max_prefixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
164b1099f1
commit
b16227c51f
34 files changed
+693
-26
No files matched your search
@@ -58,6 +58,10 @@ pub struct PeerInfo {
|
||||
pub interface: u32,
|
||||
/// Whether the peer is in our own AS.
|
||||
pub ibgp: bool,
|
||||
/// Whether routes learned from our other routers are passed on to the
|
||||
/// peer, and its routes to them: whether it is a route reflector
|
||||
/// client of ours (RFC 4456).
|
||||
pub reflector_client: bool,
|
||||
}
|
||||
|
||||
/// A peer's number in a table, given out by [`RibTable::add_peer`]. Small,
|
||||
|
||||
@@ -63,6 +63,7 @@ pub(super) fn external(number: u8) -> PeerInfo {
|
||||
address: IpAddr::from(Ipv4Addr::new(192, 0, 2, number)),
|
||||
interface: 0,
|
||||
ibgp: false,
|
||||
reflector_client: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +71,7 @@ pub(super) fn internal(number: u8) -> PeerInfo {
|
||||
PeerInfo {
|
||||
asn: 64999,
|
||||
ibgp: true,
|
||||
reflector_client: false,
|
||||
..external(number)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user