Skip to content

Conversation

davischw
Copy link
Contributor

@davischw davischw commented Feb 11, 2025

Changes allow ipv4 class E addresses in the 240.0.0.0/4 range to be displayed and used as connected routes in zebra by default.

Reason for changes are cloud providers (with customers still using obsolete ipv4 protocol, i.e. Azure, AWS) running out of ip space and abusing class E for addressing instances (announced via BGP) over tunneling connections back to customers on premise infrastructure.

Kernel routing table:

root@frr:~# ip route
default via 192.168.1.1 dev enp10s0 
192.168.1.0/24 dev enp10s0 proto kernel scope link src 192.168.1.111
192.168.122.0/24 dev enp9s0 proto kernel scope link src 192.168.122.253
240.12.12.0/24 dev enp1s0 proto kernel scope link src 240.12.12.12 <---
240.80.45.0/24 dev enp1s0 proto kernel scope link src 240.80.45.1 <---

Without patch:

frr# show ip route
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv4 unicast VRF default:
K>* 0.0.0.0/0 [0/0] via 192.168.1.1, enp10s0, weight 1, 00:00:14
C>* 192.168.1.0/24 is directly connected, enp10s0, weight 1, 00:00:14
L>* 192.168.1.111/32 is directly connected, enp10s0, weight 1, 00:00:14
C>* 192.168.122.0/24 is directly connected, enp9s0, weight 1, 00:00:14
L>* 192.168.122.253/32 is directly connected, enp9s0, weight 1, 00:00:14
K>* 240.12.12.0/24 [0/0] is directly connected, enp1s0, weight 1, 00:00:14 <---
K>* 240.80.45.0/24 [0/0] is directly connected, enp1s0, weight 1, 00:00:14 <---

With patch:

frr# show ip route
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv4 unicast VRF default:
K>* 0.0.0.0/0 [0/0] via 192.168.1.1, enp10s0, weight 1, 00:00:16
C>* 192.168.1.0/24 is directly connected, enp10s0, weight 1, 00:00:16
L>* 192.168.1.111/32 is directly connected, enp10s0, weight 1, 00:00:16
C>* 192.168.122.0/24 is directly connected, enp9s0, weight 1, 00:00:16
L>* 192.168.122.253/32 is directly connected, enp9s0, weight 1, 00:00:16
C>* 240.12.12.0/24 is directly connected, enp1s0, weight 1, 00:00:16 <---
L>* 240.12.12.12/32 is directly connected, enp1s0, weight 1, 00:00:16 <---
C>* 240.80.45.0/24 is directly connected, enp1s0, weight 1, 00:00:16 <---
L>* 240.80.45.1/32 is directly connected, enp1s0, weight 1, 00:00:16 <---

Related issues:
#16326
#17942

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@donaldsharp
Copy link
Member

NAK - PUT THE ANALYSIS IN THE COMMIT MESSAGE

@donaldsharp donaldsharp self-requested a review February 11, 2025 15:55
Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAK

@davischw
Copy link
Contributor Author

@donaldsharp

Do you have any technical reasons for NAKing this or is it just cosmetic things (commit message, comments in code, variable names)?

@donaldsharp
Copy link
Member

This is a technical reason. No commit messages are technically useless to developers several years from now when they are looking at code.

@davischw davischw changed the title Use ipv4 class E addresses (240.0.0.0/8) as connected routes by default Use ipv4 class E addresses (240.0.0.0/4) as connected routes by default Feb 12, 2025
@davischw davischw force-pushed the zebra-check-class-e branch from 6bdf47e to 3da8838 Compare February 12, 2025 12:25
@frrbot frrbot bot added the documentation label Feb 12, 2025
@davischw davischw requested a review from donaldsharp February 12, 2025 13:03
@davischw
Copy link
Contributor Author

@donaldsharp I think i addressed the changes requested by you in my latest code push. You happy?

@donaldsharp
Copy link
Member

why is this a draft?

@davischw davischw marked this pull request as ready for review February 14, 2025 11:31
@davischw
Copy link
Contributor Author

davischw commented Feb 14, 2025

@donaldsharp

why is this a draft?

Not anymore. Let me fix the detected styling issues before you pressing the merge button, though.

Changes allow ipv4 class E addresses and prefixes in the 240.0.0.0/4
range to be configured on interfaces, imported from the kernel routing
table and redistributed as connected routes in zebra by default.

Changes also fix routes with class E prefixes in kernel routing table
getting rejected by zebra during early daemon startup.

Drivin this change in default behavior are cloud providers (with
customers still using obsolete ipv4 protocol, i.e. Azure, AWS) running
out of ip space and abusing class E for addressing instances (announced
via BGP) over tunneling connections back to customers on premise
infrastructure.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
Update user documentation to reflect behavior of config command
'allow-reserved-ranges' after changes enable use of ipv4 class E
addresses by default.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
@davischw davischw force-pushed the zebra-check-class-e branch from 3da8838 to 1951e71 Compare February 14, 2025 14:06
Copy link

@olivettiwetti olivettiwetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this change fixes the problem on our systems, thank you very much.

@davischw
Copy link
Contributor Author

@donaldsharp Merge?

@riw777 riw777 merged commit 3eedab0 into FRRouting:master Feb 18, 2025
13 checks passed
@mwinter-osr
Copy link
Member

@Mergifyio backport dev/10.4

Copy link

mergify bot commented Jul 10, 2025

backport dev/10.4

✅ Backports have been created

@mwinter-osr
Copy link
Member

@Mergifyio backport stable/10.3

Copy link

mergify bot commented Jul 10, 2025

backport stable/10.3

✅ Backports have been created

ton31337 added a commit that referenced this pull request Jul 11, 2025
Use ipv4 class E addresses (240.0.0.0/4) as connected routes by default (backport #18095)
ton31337 added a commit to opensourcerouting/frr that referenced this pull request Aug 2, 2025
* bgpd: correct no form commands (backport FRRouting#18911)
* bgpd: fix to show exist/non-exist-map in 'show run' properly FRRouting#18853
* redhat: make FRR RPM build to work on RedHat 10 (backport FRRouting#18920)
* build: check for libunwind.h, not unwind.h (backport FRRouting#18912)
* bgpd: use AS4B format for BGP loc-rib messages. (backport FRRouting#18936)
* bgpd: fix for the validity and the presence of prefixes in the BGP VPN table. (backport FRRouting#17370)
* bgpd: Force adj-rib-out updates if MRAI is kicked in (backport FRRouting#18959)
* zebra: Provide SID value when sending SRv6 SID release notify message (backport FRRouting#18971)
* bgpd: Fix crash when fetching statistics for bgp instance (backport FRRouting#19003)
* nhrpd: fix crash when accessing invalid memory zone (backport FRRouting#18994)
* zebra: Initialize RB tree for router tables (backport FRRouting#19049)
* zebra: fix null pointer dereference in zebra_evpn_sync_neigh_del (backport FRRouting#19054)
* zebra: fix stale NHG in kernel (backport FRRouting#18899)
* bgpd: Fix incorrect stripping of transitive extended communities (backport FRRouting#19065)
* lib: Fix no on-match goto NUM command (backport FRRouting#19108)
* bgpd: Fix extended community check for IP non-transitive type (backport FRRouting#19097)
* bgpd: Fix DEREF_OF_NULL.EX.COND in bgp_updgrp_packet (backport FRRouting#19126)
* lib: revert addition of vtysh_flush() call in vty_out() (backport FRRouting#19109)
* bgpd: Extract link bandwidth value from extcommunity before using for WCMP (backport FRRouting#19165)
* Use ipv4 class E addresses (240.0.0.0/4) as connected routes by default (backport FRRouting#18095)
* bfdd: Set bfd.LocalDiag when transitioning to AdminDown (backport FRRouting#18592)
* zebra: clean up a json object leak (backport FRRouting#19192)
* bgpd: Do not try to reuse freed route-maps (backport FRRouting#19191)
* lib: fix routemap crash (backport FRRouting#19127)
* bgpd: initialize local variable (backport FRRouting#19233)
* ospfd: Use after free cleanup of lsa (backport FRRouting#19224)
* vtysh: copy config from file should actually apply (backport FRRouting#19242)
* bgpd : Fix compilation error in bgpd module: Update TP_ARGS for bgp (backport FRRouting#19266)
* bgpd: Ensure addpath does not withdraw selected route in some situations (backport FRRouting#19210)
* lib, zebra: mark singleton nexthops inactive/active on link state changes for wecmp (backport FRRouting#18947)
* eigrp: validate hello packets and tlvs better (backport FRRouting#19251)
* bgpd: [GR] fixed selectionDeferralTimer to display select_defer_time val FRRouting#19283

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants