-
Notifications
You must be signed in to change notification settings - Fork 1.4k
ospfd: Implement forwarding-address-self command #20077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
riw777
merged 4 commits into
FRRouting:master
from
opensourcerouting:feature/ospfv2_set_forwarder_address
Nov 25, 2025
Merged
ospfd: Implement forwarding-address-self command #20077
riw777
merged 4 commits into
FRRouting:master
from
opensourcerouting:feature/ospfv2_set_forwarder_address
Nov 25, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Donatas Abraitis <[email protected]>
b67baa5 to
e44d817
Compare
This command will be used to force external LSAs to be generated with the
Forwarding Address to be set to self to allow receiving routers sending the
traffic directly to the ASBR router instead of relying on the FD.
The use case is for ECMP if we receive an external LSA with the identical FD.
So in this case only a single entry will be installed into the RIB.
r3# show ip ospf database external
OSPF Router with ID (172.16.0.3)
AS External Link States
LS age: 66
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
LS Type: AS-external-LSA
Link State ID: 172.16.10.0 (External Network Number)
Advertising Router: 172.16.0.1
LS Seq Number: 80000001
Checksum: 0x1f1b
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
LS age: 63
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
LS Type: AS-external-LSA
Link State ID: 172.16.10.0 (External Network Number)
Advertising Router: 172.16.0.2
LS Seq Number: 80000001
Checksum: 0x1920
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
r3# show ip route 172.16.10.0/24
Routing entry for 172.16.10.0/24
Known via "ospf", distance 110, metric 20, best
Last update 00:00:25 ago
Flags: Selected
Status: Installed
* 172.16.0.1, via r3-eth0, weight 1
* 172.16.0.2, via r3-eth0, weight 1
Without this feature we have
============================
r3# show ip ospf database external
OSPF Router with ID (172.16.0.3)
AS External Link States
LS age: 68
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
LS Type: AS-external-LSA
Link State ID: 172.16.10.0 (External Network Number)
Advertising Router: 172.16.0.1
LS Seq Number: 80000001
Checksum: 0xd79b
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.16.0.10
External Route Tag: 0
LS age: 65
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
LS Type: AS-external-LSA
Link State ID: 172.16.10.0 (External Network Number)
Advertising Router: 172.16.0.2
LS Seq Number: 80000001
Checksum: 0xd1a0
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.16.0.10
External Route Tag: 0
r3# 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:
O 172.16.0.0/24 [110/10] is directly connected, r3-eth0, weight 1, 00:01:05
C>* 172.16.0.0/24 is directly connected, r3-eth0, weight 1, 00:01:05
L>* 172.16.0.3/32 is directly connected, r3-eth0, weight 1, 00:01:05
O>* 172.16.10.0/24 [110/20] via 172.16.0.10, r3-eth0, weight 1, 00:00:19
Signed-off-by: Donatas Abraitis <[email protected]>
Signed-off-by: Donatas Abraitis <[email protected]>
e44d817 to
33f5bfb
Compare
r1# show ip ospf json
{
...
"forwardingAddressSelf":true,
...
}
or
r1# show ip ospf
OSPF Routing Process, Router ID: 240.0.0.100
...
Forwarding address is set to self for external LSAs <<<<<<
...
Signed-off-by: Donatas Abraitis <[email protected]>
Jafaral
approved these changes
Nov 21, 2025
riw777
approved these changes
Nov 25, 2025
Member
riw777
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.