[FROG] BGP: /32 network cannot be advertised unless "no bgp network import-check" is present

Amol Lad Amol.Lad at 4rf.com
Mon Sep 28 12:17:17 UTC 2020


Thanks Donald, your patch fixes the issue (both ipv4 and ipv6).

-----Original Message-----
From: Donald Sharp <sharpd at cumulusnetworks.com> 
Sent: Monday, 28 September 2020 5:13 PM
To: Amol Lad <Amol.Lad at 4rf.com>
Cc: frog at lists.frrouting.org
Subject: Re: [FROG] BGP: /32 network cannot be advertised unless "no bgp network import-check" is present

Amol -

Please check and see if this commit fixes your issue:

commit e8442016a84d27c22ec1d9c8915ff7192277f680 (origin/pr/7182, donald/bgp_static_32s, bgp_static_32s)
Author: Donald Sharp <sharpd at nvidia.com>
Date:   Fri Sep 25 09:45:24 2020 -0400

    bgpd: Allow bgp static routes to use /32's

    If you are including a network statement of a /32
    then the current bgp martian checks will match the /32
    together.

    Problem:
    !
    router bgp 3235
     neighbor 192.168.161.2 remote-as external
     neighbor 192.168.161.131 remote-as external
     !
     address-family ipv4 unicast
      network 10.10.3.11/32
      network 192.168.161.0/24
      no neighbor 192.168.161.2 activate
      neighbor 192.168.161.2 route-map BLUE in
     exit-address-family
    !
    eva# show bgp ipv4 uni
    BGP table version is 1, local router ID is 10.10.3.11, vrf id 0
    Default local pref 100, local AS 3235
    Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
                   i internal, r RIB-failure, S Stale, R Removed
    Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
    Origin codes:  i - IGP, e - EGP, ? - incomplete
       Network          Next Hop            Metric LocPrf Weight Path
       10.10.3.11/32    0.0.0.0(eva)             0         32768 i
    *> 192.168.161.0/24 0.0.0.0(eva)             0         32768 i
    Displayed  2 routes and 2 total paths
    eva# show bgp import-check-table
    Current BGP import check cache:
     192.168.161.0 valid [IGP metric 0], #paths 1
      if enp39s0
      Last update: Fri Sep 25 08:00:42 2020
     10.10.3.11 valid [IGP metric 0], #paths 1
      if lo
      Last update: Fri Sep 25 08:00:42 2020
    eva# show bgp ipv4 uni summ
    BGP router identifier 10.10.3.11, local AS number 3235 vrf-id 0
    BGP table version 1
    RIB entries 3, using 576 bytes of memory
    Peers 1, using 21 KiB of memory
    Neighbor                 V         AS   MsgRcvd   MsgSent   TblVer
 InQ OutQ  Up/Down State/PfxRcd   PfxSnt
    janelle(192.168.161.131) 4      60000        69        70        0
   0    0 00:03:21            0        1
    Total number of neighbors 1

    When we are deciding that a nexthop is valid there is not much point in checking
    that a static route has a martian nexthop or not, since we self derived it already.

    Signed-off-by: Donald Sharp <sharpd at nvidia.com>

donald

On Mon, Sep 28, 2020 at 6:46 AM Amol Lad <Amol.Lad at 4rf.com> wrote:
>
> Hi,
>
> I've configured a dummy interface (in Linux) with IP Address 1.1.1.1/32 and advertising it in BGP. However, this network is not getting advertised unless I also give "no bgp network import-check" command. Please see below for more details and advise what could be going wrong or I'm missing some other configuration.
>
> (Same is true with IPv6 address with /128 prefix - this also cannot be 
> advertised unless no import-check is given even though the address 
> present in IPv6 routing table)
>
> Thanks
> Amol
>
> Current configuration:
> !
> frr version 7.4
> frr defaults traditional
> hostname FRR
> log syslog
> !
> router bgp 1
> no bgp ebgp-requires-policy
> neighbor 10.10.10.2 remote-as 2
> !
> address-family ipv4 unicast
>   network 1.1.1.1/32
> exit-address-family
> !
> line vty
> !
> end
>
> ====
>
> FRR(config-router)# do show 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, D - SHARP,
>        F - PBR, f - OpenFabric,
>        > - selected route, * - FIB route, q - queued route, r - 
> rejected route
>
> K * 1.1.1.1/32 [0/10] is directly connected, loop0, 00:54:33
> C>* 1.1.1.1/32 is directly connected, loop0, 00:54:33
>
> ===
>
> [ As you can see "*>" is missing before 1.1.1.1/32. However, If I give 
> "no bgp network import-check" then *> comes here and network is 
> advertised to neighbor]
>
> FRR(config-router)# do show bgp ipv4 unicast BGP table version is 2, 
> local router ID is 172.17.1.106, vrf id 0 Default local pref 100, 
> local AS 64512 Status codes:  s suppressed, d damped, h history, * 
> valid, > best, = multipath,
>                i internal, r RIB-failure, S Stale, R Removed Nexthop 
> codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes:  i - 
> IGP, e - EGP, ? - incomplete
>
>    Network          Next Hop            Metric LocPrf Weight Path
>    1.1.1.1/32       0.0.0.0                  0         32768 i
>
> Displayed  1 routes and 1 total paths
>
> ===
>
> root at FRR:/# ip addr show loop0
> 6: loop0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
>     link/ether 52:db:5f:99:52:d4 brd ff:ff:ff:ff:ff:ff
>     inet 1.1.1.1/32 brd 255.255.255.255 scope global loop0
>        valid_lft forever preferred_lft forever
>     inet6 fe80::50db:5fff:fe99:52d4/64 scope link
>        valid_lft forever preferred_lft forever
>
> ===
>
> _______________________________________________
> frog mailing list
> frog at lists.frrouting.org
> https://lists.frrouting.org/listinfo/frog


More information about the frog mailing list