Skip to content

Zebra overwrites the nexthop ID for a static route #304

@christophefontaine

Description

@christophefontaine

Description

With FRR connected, if a user adds a static route from grcli, Zebra re-creates that same nexthop with a different ID:

grout# add nexthop address 192.168.210.3 iface cv0
grout# show nexthop
VRF  ID  TYPE  FAMILY  IP                         MAC                IFACE  STATE      FLAGS                      ORIGIN
0        L3    IPv6    fe80::b483:51ff:fe05:43ca  b4:83:51:05:43:ca  cv0    reachable  static local gateway link  link
0        L3    IPv6    fe80::b483:51ff:fe05:43cb  b4:83:51:05:43:cb  cv1    reachable  static local gateway link  link
0        L3    IPv4    192.168.210.1              b4:83:51:05:43:ca  cv0    reachable  static local gateway link  link
0    87  L3    IPv4    192.168.210.254            ?                  cv0    new                                   zebra
0    2   L3    IPv4    192.168.210.2              ?                  cv0    new        gateway                    zebra
0    1   L3    IPv4    192.168.210.3              ?                  cv0    new                                   user
0    89  L3    IPv4    192.168.210.6              ?                  cv0    new        gateway                    zebra
grout# add ip route 192.168.1.11/32 via id 1
grout# show ip route
VRF  DESTINATION       NEXT_HOP         ORIGIN        ID  NEXT_HOP_VRF
0    192.168.1.10/32   192.168.210.254  user          87  0
0    192.168.1.11/32   192.168.210.3    user          90  0
0    192.168.1.30/32   192.168.210.6    zebra_static  89  0
0    192.168.210.0/24  192.168.210.1    link              0
grout# show nexthop
VRF  ID  TYPE  FAMILY  IP                         MAC                IFACE  STATE      FLAGS                      ORIGIN
0        L3    IPv6    fe80::b483:51ff:fe05:43ca  b4:83:51:05:43:ca  cv0    reachable  static local gateway link  link
0        L3    IPv6    fe80::b483:51ff:fe05:43cb  b4:83:51:05:43:cb  cv1    reachable  static local gateway link  link
0        L3    IPv4    192.168.210.1              b4:83:51:05:43:ca  cv0    reachable  static local gateway link  link
0    87  L3    IPv4    192.168.210.254            ?                  cv0    new                                   zebra
0    2   L3    IPv4    192.168.210.2              ?                  cv0    new        gateway                    zebra
0    90  L3    IPv4    192.168.210.3              ?                  cv0    new                                   zebra
0    89  L3    IPv4    192.168.210.6              ?                  cv0    new        gateway                    zebra

In vtysh, we see both next hops though:

compute05.mgmt.foobar.space# show nexthop-group rib
ID: 1 (kernel)
     RefCnt: 1 Time to Deletion: 00:00:02
     Uptime: 00:03:18
     VRF: default(IPv4)
     Nexthop Count: 1
     Valid, Installed
     Interface Index: 257
           via 192.168.210.3, cv0 (vrf default), weight 1
ID: 90 (zebra)
     RefCnt: 2
     Uptime: 00:02:58
     VRF: default(IPv4)
     Nexthop Count: 1
     Valid, Installed
     Interface Index: 257
           via 192.168.210.3, cv0 (vrf default), weight 1

Version

grout v0.11.0-62-gc029279c-dirty (DPDK 24.11.1)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions