Carry IPv4 routes over IPv6 sessions with IPv6 next hops (RFC 8950)
For a link that has only IPv6 addresses. - The Extended Next Hop capability is offered on every session over IPv6 whose families include IPv4 unicast, and used if the peer offers it too. Nothing to configure. - On such a session our IPv4 routes go out in MP_REACH_NLRI with the session's IPv6 address as next hop, and are withdrawn in MP_UNREACH_NLRI. Without the agreement they are not sent, as before. - IPv4 routes are read with an IPv6 next hop, global or global with link-local. - The kernel installer resolves an IPv4 route's IPv6 next hop like any other and installs it: by way of an IPv6 nexthop object, or with RTA_VIA where routes carry their own gateway. Tested against a real kernel in both modes, with a link-local next hop too, and in the lab against FRR and BIRD: the new `v6only` phase takes the IPv4 addresses off the exchange LAN, runs one IPv6 session with each router for both families, and pings IPv4 across. Sessions between link-local addresses are not supported yet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
321af51e4b
commit
92e013ca01
14 files changed
+511
-23
No files matched your search
@@ -125,6 +125,9 @@ pub struct SessionHandle {
|
||||
pub role: Option<PeerRole>,
|
||||
/// Whether the peer said so itself in its OPEN (RFC 9234).
|
||||
pub role_confirmed: bool,
|
||||
/// Whether IPv4 routes go with IPv6 next hops on this session
|
||||
/// (RFC 8950).
|
||||
pub extended_next_hop: bool,
|
||||
/// Whether the peer negotiated RFC 6793 four-octet ASNs. Determines how
|
||||
/// AS_PATH is encoded on the wire for this session.
|
||||
pub four_octet_asn: bool,
|
||||
@@ -170,6 +173,7 @@ impl SessionHandle {
|
||||
ibgp: negotiated.ibgp,
|
||||
role: None,
|
||||
role_confirmed: false,
|
||||
extended_next_hop: negotiated.extended_next_hop,
|
||||
four_octet_asn: negotiated.four_octet_asn,
|
||||
families: negotiated.families.clone(),
|
||||
add_path_receive: negotiated.add_path_receive.clone(),
|
||||
|
||||
Reference in new issue
Block a user