FRRouting / frr

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

Vpn4 route is not imported to VRF #16036

Open dpac opened 6 months ago

dpac commented 6 months ago

Hi

I am using frr container and noticed bgp route is showing as invalid . It doesn't get import into VRF . The issue looks similar to this issue . I am using latest version . Am i missing something ?

9bb03e71fecc# show version FRRouting 10.1-dev_git20240513 (9bb03e71fecc) on Linux(6.1.87-99.174.amzn2023.x86_64). Copyright 1996-2005 Kunihiro Ishiguro, et al. configured with: '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--sbindir=/usr/lib/frr' '--libdir=/usr/lib' '--enable-rpki' '--enable-vtysh' '--enable-multipath=64' '--enable-vty-group=frrvty' '--enable-user=frr' '--enable-group=frr' '--enable-pcre2posix' '--enable-scripting' 'CC=gcc' 'CXX=g++'

Topology

C01(VRF-BOSTON) > R2(2.2.2.2) > R3(3.3.3.3) > R4(4.4.4.4) > R5(5.5.5.5) > c02 (VRF-BOSTON)

R2 , R3 ,R4,R5 have active MPLS interface. All routers are docker containers in a single node.

routes in vrf BOSTON on R2 (provider edge)

9bb03e71fecc# show ip bgp vrf BOSTON detail
BGP table version is 1, local router ID is 192.168.11.2, vrf id 2
Default local pref 100, local AS 65000
BGP routing table entry for 192.168.11.0/24, version 1
Paths: (1 available, best #1, vrf BOSTON)
  Not advertised to any peer
  Local
    0.0.0.0 from 0.0.0.0 (192.168.11.2)
      Origin incomplete, metric 0, weight 32768, valid, sourced, best (First path received)
      Last update: Tue May 14 06:05:51 2024
BGP routing table entry for 192.168.33.0/24, version 0
Paths: (1 available, no best path)
  Not advertised to any peer
  Imported from 65000:11:192.168.33.0/24
  Local
    5.5.5.5 (metric 30) from 0.0.0.0 (192.168.11.2) vrf default(0) announce-nh-self
      Origin incomplete, metric 0, localpref 100, invalid, sourced, local
      Extended Community: RT:65000:11
      Remote label: 145
      Last update: Fri May 17 10:50:16 2024

Displayed 2 routes and 2 total paths

Labels

9bb03e71fecc# show mpls ldp ipv4 binding
AF   Destination          Nexthop         Local Label Remote Label  In Use
ipv4 2.2.2.2/32           3.3.3.3         imp-null    16                no
ipv4 3.3.3.3/32           3.3.3.3         16          imp-null         yes
ipv4 4.4.4.4/32           3.3.3.3         17          17               yes
ipv4 5.5.5.5/32           3.3.3.3         20          19               yes
ipv4 10.0.23.0/24         3.3.3.3         imp-null    imp-null          no
ipv4 10.0.34.0/24         3.3.3.3         18          imp-null         yes
ipv4 10.0.45.0/24         3.3.3.3         19          18               yes
ipv4 192.168.11.0/24      0.0.0.0         imp-null    -                 no
ipv4 192.168.22.0/24      0.0.0.0         imp-null    -                 no

BGP config

9bb03e71fecc# show run bgpd
Building configuration...

Current configuration:
!
frr version 10.1-dev_git20240513
frr defaults traditional
hostname 9bb03e71fecc
!
vrf BOSTON
exit-vrf
!
router bgp 65000
 bgp router-id 2.2.2.2
 neighbor 5.5.5.5 remote-as 65000
 neighbor 5.5.5.5 disable-connected-check
 neighbor 5.5.5.5 update-source lo
 !
 address-family ipv4 unicast
  neighbor 5.5.5.5 next-hop-self
 exit-address-family
 !
 address-family ipv4 vpn
  neighbor 5.5.5.5 activate
  neighbor 5.5.5.5 next-hop-self
  exit-address-family
exit
!
router bgp 65000 vrf BOSTON
 !
 address-family ipv4 unicast
  redistribute connected
  label vpn export auto
  rd vpn export 65000:11
  rt vpn both 65000:11
  export vpn
  import vpn
 exit-address-family
exit
!
ton31337 commented 4 months ago

Could you show show ip route, show ip route vrf BOSTON?

dpac commented 4 months ago

Could you show show ip route, show ip route vrf BOSTON?

Thank you for looking into it. Here are the outputs

[root@ip-10-0-0-161 ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6ae66409049e 0a58c9ac55bf "/sbin/tini -- /usr/…" 8 weeks ago Up 8 weeks r5 add54c9588c7 0a58c9ac55bf "/sbin/tini -- /usr/…" 8 weeks ago Up 8 weeks r4 9d025506b661 0a58c9ac55bf "/sbin/tini -- /usr/…" 8 weeks ago Up 8 weeks r3 9bb03e71fecc 0a58c9ac55bf "/sbin/tini -- /usr/…" 8 weeks ago Up 8 weeks r2 6422dd03274a frrouting/frr "/sbin/tini -- /usr/…" 8 weeks ago Up 8 weeks c02 7bf9c653cdb2 frrouting/frr "/sbin/tini -- /usr/…" 8 weeks ago Up 8 weeks c01

[root@ip-10-0-0-161 ~]# docker exec -it r5 bash 6ae66409049e:/# vtysh % Can't open configuration file /etc/frr/vtysh.conf due to 'No such file or directory'. Configuration file[/etc/frr/frr.conf] processing failure: 11

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

6ae66409049e# show ip route vrf BOSTON 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, F - PBR, f - OpenFabric, t - Table-Direct,

  • selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure

VRF BOSTON: C> 192.168.33.0/24 is directly connected, eth1, 08w0d22h L> 192.168.33.2/32 is directly connected, eth1, 08w0d22h

6ae66409049e# 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, F - PBR, f - OpenFabric, t - Table-Direct,

  • selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure

K> 0.0.0.0/0 [0/0] via 10.0.45.1, eth0, 08w0d22h O> 2.2.2.2/32 [110/30] via 10.0.45.4, eth0, weight 1, 08w0d22h O> 3.3.3.3/32 [110/20] via 10.0.45.4, eth0, weight 1, 08w0d22h O> 4.4.4.4/32 [110/10] via 10.0.45.4, eth0, weight 1, 08w0d22h O 5.5.5.5/32 [110/0] is directly connected, lo, weight 1, 08w0d22h L 5.5.5.5/32 is directly connected, lo, 08w0d22h C> 5.5.5.5/32 is directly connected, lo, 08w0d22h O> 10.0.23.0/24 [110/30] via 10.0.45.4, eth0, weight 1, 08w0d22h O> 10.0.34.0/24 [110/20] via 10.0.45.4, eth0, weight 1, 08w0d22h O 10.0.45.0/24 [110/10] is directly connected, eth0, weight 1, 08w0d22h C> 10.0.45.0/24 is directly connected, eth0, 08w0d22h L> 10.0.45.5/32 is directly connected, eth0, 08w0d22h

ton31337 commented 4 months ago

Could you give all the configs of all your routers?

dpac commented 3 months ago

Could you give all the configs of all your routers?

Yes , i have synced the config here

https://github.com/dpac/mpls

To create vrf , i use startup.sh script.

ton31337 commented 3 months ago

Your configs are incomplete, I tried to load them but seems some routers are missing IP addresses on interfaces, e.g. https://github.com/dpac/mpls/blob/main/r5.conf#L18. Looking at the output https://github.com/FRRouting/frr/issues/16036#issuecomment-2242358018... This is not the output from the R2 perspective, it's from R5. Can you show it from R2?

Btw, by changing some of the configs you gave, I can clearly see the imported routes:

r2# show ip bgp vrf BOSTON detail
BGP table version is 1, local router ID is 0.0.0.0, vrf id 4
Default local pref 100, local AS 65000
BGP routing table entry for 192.168.33.0/24, version 1
Paths: (1 available, best #1, vrf BOSTON)
  Not advertised to any peer
  Imported from 192.168.33.2:2:192.168.33.0/24
  Local
    5.5.5.5 (metric 30) from 0.0.0.0 (0.0.0.0) vrf default(0) announce-nh-self
      Origin incomplete, metric 0, localpref 100, valid, sourced, local, best (First path received)
      Extended Community: RT:65000:11
      Remote label: 80
      Last update: Thu Aug  8 11:12:43 2024

Displayed 1 routes and 1 total paths
r2# show ip route vrf BOSTON 
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

VRF BOSTON:
B>  192.168.33.0/24 [200/0] via 5.5.5.5 (vrf default) (recursive), label 80, weight 1, 00:05:49
  *                           via 10.0.23.3, r2-eth1 (vrf default), label 18/80, weight 1, 00:05:49
r2# 
dpac commented 3 months ago

Thanks for pointing out , I have synced the current config of r2. The ip address is configured on eth0. Can you share the config and container image used ?

output from r2

[root@ip-10-0-0-161 mpls]# docker exec -it r2 bash 9bb03e71fecc:/# vtysh % Can't open configuration file /etc/frr/vtysh.conf due to 'No such file or directory'. Configuration file[/etc/frr/frr.conf] processing failure: 11

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

9bb03e71fecc# show ip route vrf BOSTON 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, F - PBR, f - OpenFabric, t - Table-Direct,

  • selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure

VRF BOSTON: C> 192.168.11.0/24 is directly connected, eth1, 12w2d22h L> 192.168.11.2/32 is directly connected, eth1, 12w2d22h

[root@ip-10-0-0-161 mpls]# docker exec -it r2 bash 9bb03e71fecc:/# vtysh -c "show ip route" % Can't open configuration file /etc/frr/vtysh.conf due to 'No such file or directory'. Configuration file[/etc/frr/frr.conf] processing failure: 11 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, F - PBR, f - OpenFabric, t - Table-Direct,

  • selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure

K> 0.0.0.0/0 [0/0] via 10.0.23.1, eth0, 12w2d22h O 2.2.2.2/32 [110/0] is directly connected, lo, weight 1, 12w2d22h L 2.2.2.2/32 is directly connected, lo, 12w2d22h C> 2.2.2.2/32 is directly connected, lo, 12w2d22h O> 3.3.3.3/32 [110/10] via 10.0.23.3, eth0, weight 1, 12w2d22h O> 4.4.4.4/32 [110/20] via 10.0.23.3, eth0, weight 1, 12w2d22h O> 5.5.5.5/32 [110/30] via 10.0.23.3, eth0, weight 1, 12w2d22h O 10.0.23.0/24 [110/10] is directly connected, eth0, weight 1, 12w2d22h C> 10.0.23.0/24 is directly connected, eth0, 12w2d22h L> 10.0.23.2/32 is directly connected, eth0, 12w2d22h O> 10.0.34.0/24 [110/20] via 10.0.23.3, eth0, weight 1, 12w2d22h O> 10.0.45.0/24 [110/30] via 10.0.23.3, eth0, weight 1, 12w2d22h

Ip address on eth0

interface eth0 ip address 10.0.23.2/24 ip ospf network point-to-point exit