FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.34k stars 1.25k forks source link

Inacitve routes are not being shown #12633

Open alexvelkov1 opened 1 year ago

alexvelkov1 commented 1 year ago

Hello everybody,

I have an issue of routes not being shown in the output of show ip route. The route is a static route pointing to a gateway that is not reachable. The route is present in the configuration and visible when running show running. So, I expect to see the route as configured, but as not yet active in the output somehow, e.g. without the * mark. This is true also for older versions of FRR, I checked back down to version 8.2.2.

Steps to reproduce:

[~]# vtysh 

Hello, this is FRRouting (version 8.4.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

# show run   
Building configuration...

Current configuration:
!
frr version 8.4.1
frr defaults traditional

log syslog
no service integrated-vtysh-config
username root nopassword
!
debug zebra events
debug zebra packet
debug zebra kernel
debug zebra rib
debug zebra fpm
!
password nopassword
!
ip route 172.16.1.1/32 10.128.1.1 table 254
!
exit
!
end
# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, B - BGP, T - Table, v - VNC, V - VNC-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 10.0.3.0/24 is directly connected, eth1, 03:19:37
C>* 172.16.0.0/24 is directly connected, eth0, 03:28:43
# 

Logs during configure:
- trigger "ip route 172.16.1.1/32 10.128.1.1 table 254" in the vtysh
zebra   [ 1372]: zebra message[ZEBRA_NEXTHOP_REGISTER:0:21] comes from socket [18]
zebra   [ 1372]: Read 1 packets from client: static
zebra   [ 1372]: zebra message[ZEBRA_ROUTE_DELETE:0:34] comes from socket [18]
zebra   [ 1372]: Read 1 packets from client: static
zebra   [ 1372]: zread_route_del: p=(0:254)172.16.1.1/32, msg flags=0x103, flags=0x41
zebra   [ 1372]: default[254]:(null) doesn't exist in rib

- The output using this configuration in Quagga:
# vtysh

Hello, this is Quagga (version 1.2.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, P - PIM, A - Babel, N - NHRP,
       > - selected route, * - FIB route

C>* 10.0.3.0/24 is directly connected, eth1
C>* 172.16.0.0/24 is directly connected, eth0
S   172.16.1.1/32[1/0] via 10.128.1.1 inactive

Thanks for any help!

Regards Alexander Velkov

donaldsharp commented 1 year ago

When FRR transitioned to a pure static daemon, staticd changed to not install the routes until the nexthop was valid ( ala all the other routing protocols not installing a route unless it is workable ).

alexvelkov1 commented 1 year ago

Thanks for the quick response! OK, I understand that the route should not be set in the kernel if it is invalid. But I think it would be good to somehow see it in the output of show ip route. One cannot distinguish between no route and a configured/inactive route. What do you think?

donaldsharp commented 1 year ago

show run?

alexvelkov1 commented 1 year ago

Well, yes I can see the route in the present configuration by using show run. However, I can not easily see the workable state of the FRR route.

I think showing the state of such routes in show ip route is a user friendly and useful feature.

donaldsharp commented 1 year ago

Yes you can it's not workable so it doesn't show up

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

frrbot[bot] commented 1 year ago

This issue will be automatically closed in the specified period unless there is further activity.

qlyoung commented 1 year ago

@donaldsharp What @alexvelkov1 is saying is that they would like to see all routes in the output of show ip route, including routes which are not installed. Routes which are not installed should have some sort of indication that that is their state.

frrbot[bot] commented 1 year ago

This issue will no longer be automatically closed.