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

directly connected via vti peers are reported as "invalid must be connected" #13176

Closed
2 tasks done
eltorio opened this issue Mar 31, 2023 · 3 comments
Closed
2 tasks done
Labels
triage Needs further investigation

Comments

@eltorio
Copy link

eltorio commented Mar 31, 2023

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

To Reproduce
Using the latest frr-stable from https://deb.frrouting.org/

ip add
### short version , all public ip are fake
17: vti0@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 1.2.3.4 peer 2.2.3.4
    inet 10.18.74.19/31 scope global vti0
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:587:b21c/64 scope link 
       valid_lft forever preferred_lft forever
18: vti4@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 1.2.3.4 peer 4.5.6.7
    inet 10.18.74.101/30 scope global vti4
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:587:b21c/64 scope link 
       valid_lft forever preferred_lft forever
19: vti5@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 1.2.3.4 peer 4.5.6.8
    inet 10.18.74.105/30 scope global vti5
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:587:b21c/64 scope link 
       valid_lft forever preferred_lft forever
20: vti6@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 1.2.3.4 peer 129.151.229.169
    inet 10.18.74.109/30 scope global vti6
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:587:b21c/64 scope link 
       valid_lft forever preferred_lft forever
21: vti7@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 1.2.3.4 peer 4.5.6.10
    inet 10.18.74.113/30 scope global vti7
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:587:b21c/64 scope link 
       valid_lft forever preferred_lft forever
22: vti1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 1.2.3.4 peer 4.5.6.11
    inet 10.18.74.6/31 scope global vti1
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:587:b21c/64 scope link 
       valid_lft forever preferred_lft forever
23: vti2@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 1.2.3.4 peer 4.5.6.12
    inet 10.18.74.10/31 scope global vti2
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:587:b21c/64 scope link 
       valid_lft forever preferred_lft forever
!
frr version 8.5
frr defaults traditional
hostname host.fqdn
log syslog informational
service integrated-vtysh-config
!
router bgp 4205951201
 no bgp hard-administrative-reset
 no bgp graceful-restart notification
 neighbor mynet peer-group
 neighbor mynet remote-as 4206244001
 neighbor mynet bfd
 neighbor distantnet peer-group
 neighbor distantnet remote-as 31898
 neighbor distantnet bfd
 neighbor 10.18.74.18 peer-group mynet
 neighbor 10.18.74.7 peer-group distantnet
 neighbor 10.18.74.11 peer-group distantnet
 neighbor 10.74.18.102 peer-group distantnet
 neighbor 10.74.18.106 peer-group distantnet
 neighbor 10.74.18.110 peer-group distantnet
 neighbor 10.74.18.114 peer-group distantnet
 !
 address-family ipv4 unicast
  network 192.168.168.0/24
  neighbor mynet route-map ALLOW-ALL in
  neighbor mynet route-map ALLOW-ALL out
  neighbor distantnet route-map ALLOW-ALL in
  neighbor distantnet route-map ALLOW-ALL out
 exit-address-family
exit
!
route-map ALLOW-ALL permit 100
exit
!
# show bgp nexthop 
Current BGP nexthop cache:
 10.18.74.7 valid [IGP metric 0], #paths 2, peer 10.18.74.7
  if vti1
  Last update: Fri Mar 31 12:35:52 2023
 10.18.74.11 valid [IGP metric 0], #paths 2, peer 10.18.74.11
  if vti2
  Last update: Fri Mar 31 12:35:52 2023
 10.18.74.18 valid [IGP metric 0], #paths 10, peer 10.18.74.18
  if vti0
  Last update: Fri Mar 31 12:35:52 2023
 10.74.18.102 invalid, #paths 0, peer 10.74.18.102
  Must be Connected
  Last update: Fri Mar 31 12:35:52 2023
 10.74.18.106 invalid, #paths 0, peer 10.74.18.106
  Must be Connected
  Last update: Fri Mar 31 12:35:52 2023
 10.74.18.110 invalid, #paths 0, peer 10.74.18.110
  Must be Connected
  Last update: Fri Mar 31 12:35:52 2023
 10.74.18.114 invalid, #paths 0, peer 10.74.18.114
  Must be Connected
  Last update: Fri Mar 31 12:35:52 2023
sh ip route
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, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/100] via 5.1.2.3.1, ens160, src 1.2.3.4, 00:45:08
C>* 1.2.3.0/24 [0/100] is directly connected, ens160, 00:45:08
K>* 1.2.3.4/32 [0/100] is directly connected, ens160, 00:45:08
B>* 10.0.253.0/24 [20/0] via 10.18.74.7, vti1, weight 1, 00:44:55
  *                      via 10.18.74.11, vti2, weight 1, 00:44:55
B>* 10.0.254.0/24 [20/0] via 10.18.74.7, vti1, weight 1, 00:44:55
  *                      via 10.18.74.11, vti2, weight 1, 00:44:55
B>* 10.1.0.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
B>* 10.1.1.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
B>* 10.2.0.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
B>* 10.2.1.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
B>* 10.3.0.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
B>* 10.3.1.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
K>* 10.18.0.1/32 [0/0] is directly connected, wg0, 00:45:08
K>* 10.18.0.2/32 [0/0] is directly connected, wg0, 00:45:08
K>* 10.18.0.3/32 [0/0] is directly connected, wg0, 00:45:08
K>* 10.18.0.4/32 [0/0] is directly connected, wg0, 00:45:08
K>* 10.18.0.5/32 [0/0] is directly connected, wg0, 00:45:08
K>* 10.18.0.6/32 [0/0] is directly connected, wg0, 00:45:08
C>* 10.18.0.254/32 is directly connected, wg0, 00:45:08
C>* 10.18.74.6/31 is directly connected, vti1, 00:45:08
C>* 10.18.74.10/31 is directly connected, vti2, 00:45:08
C>* 10.18.74.18/31 is directly connected, vti0, 00:45:08
C>* 10.18.74.100/30 is directly connected, vti4, 00:45:08
C>* 10.18.74.104/30 is directly connected, vti5, 00:45:08
C>* 10.18.74.108/30 is directly connected, vti6, 00:45:08
C>* 10.18.74.112/30 is directly connected, vti7, 00:45:08
B>* 192.168.2.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
B>* 192.168.92.0/24 [20/0] via 10.18.74.18, vti0, weight 1, 00:45:03
C>* 192.168.168.0/24 is directly connected, ens192, 00:45:08
K>* 213.186.33.99/32 [0/100] via 1.2.3.254, ens160, src 5.1.2.3.1, 00:45:08
root@myhost:/# ping -c1 10.18.74.102
PING 10.18.74.102 (10.18.74.102) 56(84) bytes of data.
64 bytes from 10.18.74.102: icmp_seq=1 ttl=64 time=15.1 ms

--- 10.18.74.102 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 15.089/15.089/15.089/0.000 ms
root@myhost:/# ping -c1 10.18.74.106
PING 10.18.74.106 (10.18.74.106) 56(84) bytes of data.
64 bytes from 10.18.74.106: icmp_seq=1 ttl=64 time=15.1 ms

--- 10.18.74.106 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 15.068/15.068/15.068/0.000 ms
root@myhost:/# ping -c1 10.18.74.110
PING 10.18.74.110 (10.18.74.110) 56(84) bytes of data.
64 bytes from 10.18.74.110: icmp_seq=1 ttl=64 time=15.3 ms

--- 10.18.74.110 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 15.289/15.289/15.289/0.000 ms
root@myhost:/# ping -c1 10.18.74.114
PING 10.18.74.114 (10.18.74.114) 56(84) bytes of data.
64 bytes from 10.18.74.114: icmp_seq=1 ttl=64 time=15.1 ms

--- 10.18.74.114 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 15.072/15.072/15.072/0.000 ms

Expected behavior
neighbors 10.18.74.102, 10.18.74.106, 10.18.74.110 and 10.18.74.114 are directly connected via vti4, vti5, vti6 and vti7.
they are correctly reported as connected:

C>* 10.18.74.100/30 is directly connected, vti4, 00:45:08
C>* 10.18.74.104/30 is directly connected, vti5, 00:45:08
C>* 10.18.74.108/30 is directly connected, vti6, 00:45:08
C>* 10.18.74.112/30 is directly connected, vti7, 00:45:08

They must appear as connected

Versions

@eltorio eltorio added the triage Needs further investigation label Mar 31, 2023
@eltorio
Copy link
Author

eltorio commented Mar 31, 2023

it seems that there is a bug in the /30 subnet analysis
10.18.74.112/30 contains: the 10.18.74.113 and 10.18.74.114 hosts

network 10.18.74.112 is 00001010000100100100101001110000
/30 subnet is 255.255.255.252 is 11111111.11111111.11111111.11111100.
so valid addresses within this subnet are those with the last 2 bits:

binary decimal usage
00001010000100100100101001110000 10.18.74.112 network
00001010000100100100101001110001 10.18.74.113 host 1
00001010000100100100101001110010 10.18.74.114 host 2
00001010000100100100101001110011 10.18.74.115 broadcast

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

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
Copy link

frrbot bot commented Oct 3, 2023

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

@frrbot frrbot bot closed this as completed Oct 10, 2023
@frrbot frrbot bot removed the autoclose label Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

1 participant