Skip to content
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

[FreeBSD] - static routes are not set after raising the interface #3937

Open
2 tasks done
pautiina opened this issue Mar 13, 2019 · 1 comment
Open
2 tasks done

[FreeBSD] - static routes are not set after raising the interface #3937

pautiina opened this issue Mar 13, 2019 · 1 comment
Assignees
Labels
platform Issue in a specific platform staticd zebra

Comments

@pautiina
Copy link

Things you may try first

  • Did you check if this is a duplicate issue?
  • Did you test it on the latest FRRouting/frr master branch?

Description

I have use mpd5 for l2tp tunnel connection to my server and create static route for remote client. After client reconnect - static routes disappear from the system kernel, but remain in the FRR

In the master branch, static routes are not installed at all on these interfaces.

Steps to Reproduce

[root@noc /]# ifconfig ng4
ng4: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1446
        inet 10.17.0.1 --> 10.17.0.7 netmask 0xffffffff
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
[root@noc /]# route get 10.0.30.0
   route to: 10.0.30.0
destination: 10.0.30.0
       mask: 255.255.255.0
    gateway: 10.17.0.7
        fib: 0
  interface: ng4
      flags: <UP,GATEWAY,DONE,PROTO1>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1446         1         0
[root@noc /]#
[root@noc /]# vtysh -c "show ip route 10.0.30.0/24 longer-prefixes"
Codes: K - kernel route, C - connected, 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,
       > - selected route, * - FIB route

S>* 10.0.30.0/24 [1/0] via 10.17.0.7, ng4, 00:23:51
[root@noc /]#
[root@noc /]# /usr/local/etc/rc.d/mpd5 restart
Stopping mpd5.
Waiting for PIDS: 69677.
Starting mpd5.
[root@noc /]#
[root@noc /]#  route get 10.0.30.0
   route to: 10.0.30.0
destination: default
       mask: default
    gateway: gate
        fib: 0
  interface: vtnet0
      flags: <UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1500         1         0
[root@noc /]#
[root@noc /]# vtysh -c "show ip route 10.0.30.0/24 longer-prefixes"
Codes: K - kernel route, C - connected, 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,
       > - selected route, * - FIB route

S>* 10.0.30.0/24 [1/0] via 10.17.0.7, ng4, 00:01:34
[root@noc /]#
[root@noc /]# /usr/local/etc/rc.d/frr restart
Stopping staticd.
Waiting for PIDS: 95172.
Stopping ospfd.
Waiting for PIDS: 95166.
Stopping zebra.
Waiting for PIDS: 95160.
Checking zebra.conf

2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng0 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng1 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng3 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng4 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: Disabling MPLS support (no kernel support)
OK
Starting zebra.
2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng0 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng1 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng3 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: warning: connected_add_ipv6 called for interface ng4 with peer flag set, but no peer address supplied
2019/03/13 10:23:10 warnings: ZEBRA: Disabling MPLS support (no kernel support)
Checking ospfd.conf
OK
Starting ospfd.
Checking staticd.conf
OK
Starting staticd.
[root@noc /]#  route get 10.0.30.0
   route to: 10.0.30.0
destination: 10.0.30.0
       mask: 255.255.255.0
    gateway: 10.17.0.7
        fib: 0
  interface: ng4
      flags: <UP,GATEWAY,DONE,PROTO1>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1446         1         0
[root@noc /]#

Expected behavior:
Routes must be returned to the kernel fib after tunnel interfaces reconnect

Actual behavior:
Routes remain in the FRR, but they do not install on kernel fib

Components

[staticd]

Versions

  • OS: [name] [version]
  • Kernel: [BSD] [12.0]
  • FRR: [6.2]

Attachments

2019/03/13 09:56:33 ZEBRA: kernel_rtm_ipv4: 10.0.41.0/24: rtm_write() unexpectedly returned -4 for command RTM_DELETE
2019/03/13 09:56:33 ZEBRA: kernel_rtm_ipv4: 172.16.5.0/24: rtm_write() unexpectedly returned -4 for command RTM_DELETE
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: Can't lookup mtu by ioctl(SIOCGIFMTU)
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: Can't lookup mtu by ioctl(SIOCGIFMTU)
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: Can't lookup mtu by ioctl(SIOCGIFMTU)
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: Can't lookup mtu by ioctl(SIOCGIFMTU)
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: vrf_if_ioctl(SIOCGIFFLAGS) failed: Device not configured
2019/03/13 09:56:33 ZEBRA: Can't lookup mtu by ioctl(SIOCGIFMTU)
2019/03/13 09:56:39 ZEBRA: warning: connected_add_ipv6 called for interface ng0 with peer flag set, but no peer address supplied
2019/03/13 09:56:40 ZEBRA: warning: connected_add_ipv6 called for interface ng1 with peer flag set, but no peer address supplied
2019/03/13 09:56:41 ZEBRA: warning: connected_add_ipv6 called for interface ng2 with peer flag set, but no peer address supplied
2019/03/13 09:56:43 ZEBRA: warning: connected_add_ipv6 called for interface ng3 with peer flag set, but no peer address supplied
2019/03/13 09:57:01 ZEBRA: Client 'static' encountered an error and is shutting down.

@vgrebenschikov
Copy link

vgrebenschikov commented Jul 26, 2021

See #9188 - once configured interface my provide either connected routes (set with ifconfig) or kernel routes
(set by hands with some interface configuration script)

Contrary - static routes - something configured by by administrator in vtysh

but patch above fixes only case when there are no gateway IP on such routes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform Issue in a specific platform staticd zebra
Projects
None yet
Development

No branches or pull requests

3 participants