Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[need help]BGP multihop setup with Bird - some issue about [BGP Error: Hold timer expired]
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[need help]BGP multihop setup with Bird - some issue about [BGP Error: Hold timer expired]

crazychencrazychen Member

I don't understand Multihop in BGP. I'm having a bit of trouble, the session is established normally, but every 15 seconds (Hold timer interval), the connection is disconnected, the routes in the session are sent and received normally (Established conn), is there something I need to adjust?

MY Endpoint:185.243.218.A / 2a03:94e0:ffff:185:243:218::A / AS12345
UP Endpoint:185.125.170.253 / 2a03:94e0:f253:: / AS56655

root@debian:~# traceroute 185.125.170.253
traceroute to 185.125.170.253 (185.125.170.253), 30 hops max, 60 byte packets
 1  185.243.218.3 (185.243.218.3)  0.205 ms  9.474 ms  9.467 ms
 2  185.125.170.253 (185.125.170.253)  9.460 ms  9.450 ms  9.440 ms
root@debian:~# traceroute 2a03:94e0:f253::
traceroute to 2a03:94e0:f253:: (2a03:94e0:f253::), 30 hops max, 80 byte packets
 1  2a03:94e0:ffff:185:243:218:0:2 (2a03:94e0:ffff:185:243:218:0:2)  0.217 ms  0.245 ms  0.284 ms
 2  2a03:94e0:f253:: (2a03:94e0:f253::)  0.223 ms  0.262 ms  0.250 ms

Minimize Bird Conf:

protocol static {
    ipv4;

    route 185.125.170.253/32 via 185.243.218.3 via 185.243.218.A; 
}

protocol static {
    ipv6;

    route 2a03:94e0:f253::/128 via 2a03:94e0:ffff:185:243:218:0:2 via 2a03:94e0:ffff:185:243:218::A;
}

template bgp bgppeers {
    graceful restart on;
    local as 12345;
    default bgp_local_pref 100; 

    hold time 30;
    keepalive time 1;

    multihop 3;

    ipv4 {
        import filter {
            if ( roa_check(roa4_internet, net, bgp_path.last) = ROA_INVALID ) then reject;
            accept;
        };
        export filter {
            reject;
        };
    };

    ipv6 {
        import filter {
            if ( roa_check(roa6_internet, net, bgp_path.last) = ROA_INVALID ) then reject;
            accept;
        };
        export filter {
            reject;
        };
    };
}

protocol bgp terrahost_v4 from bgppeers {
  source address 185.243.218.A;
  neighbor 185.125.170.253 as 56655;

  ipv6 {
    import none;
    export none;
  };
}

protocol bgp terrahost_v6 from bgppeers {
  source address 2a03:94e0:ffff:185:243:218::A;
  neighbor 2a03:94e0:f253:: as 56655;

  ipv4 {
    import none;
    export none;
  };
}

Comments

  • tomletomle Member, LIR

    Remove the static routes for the remote peer, it breaks your routing.

  • @tomle said:
    Remove the static routes for the remote peer, it breaks your routing.

    Thank you for your help.

    also get [BGP Error: Hold timer expire]

    protocol static {
        ipv4;
    }
    
    protocol static {
        ipv6;
    }
    
  • tomletomle Member, LIR

    What's your route -n when connected?

  • crazychencrazychen Member
    edited May 2023

    @tomle said:
    What's your route -n when connected?

    root@debian:~# birdc s p 
    BIRD 2.0.7 ready.
    Name       Proto      Table      State  Since         Info
    cloudflare RPKI       ---        up     20:51:45.486  Sync-Running
    kernel1    Kernel     master4    up     20:51:45.483  
    kernel2    Kernel     master6    up     20:51:45.483  
    static1    Static     master4    up     20:51:45.483  
    static2    Static     master6    up     20:51:45.483  
    terrahost_v4 BGP        ---        up     20:51:50.300  Established   
    terrahost_v6 BGP        ---        up     20:51:49.255  Established   
    root@debian:~# !ro
    route -n | head
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         185.243.218.1   0.0.0.0         UG    0      0        0 vmbr0
    41.86.37.0      -               255.255.255.0   !     32     -        0 -
    41.209.0.0      -               255.255.192.0   !     32     -        0 -
    44.31.85.0      -               255.255.255.0   !     32     -        0 -
    45.12.135.0     -               255.255.255.0   !     32     -        0 -
    45.173.54.0     -               255.255.255.0   !     32     -        0 -
    45.183.178.0    -               255.255.255.0   !     32     -        0 -
    103.165.184.0   -               255.255.254.0   !     32     -        0 -
    

    wait ~20s

    root@debian:~# birdc s p 
    BIRD 2.0.7 ready.
    Name       Proto      Table      State  Since         Info
    cloudflare RPKI       ---        up     20:51:45.486  Established
    kernel1    Kernel     master4    up     20:51:45.483  
    kernel2    Kernel     master6    up     20:51:45.483  
    static1    Static     master4    up     20:51:45.483  
    static2    Static     master6    up     20:51:45.483  
    terrahost_v4 BGP        ---        start  20:56:43.705  Idle          BGP Error: Hold timer expired
    terrahost_v6 BGP        ---        start  20:55:52.641  Idle          BGP Error: Hold timer expired
    root@debian:~# route -n | head
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         185.243.218.1   0.0.0.0         UG    0      0        0 vmbr0
    185.243.218.0   0.0.0.0         255.255.255.0   U     0      0        0 vmbr0
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 vmbr1
    root@debian:~# 
    
  • terrahostterrahost Member, Patron Provider

    Hey, you should not have to specify hold timer. Please remove that. Since ours will be lower thats what they will agree on when establishing connection.

    Thanked by 1Ganonk
  • @terrahost said:
    Hey, you should not have to specify hold timer. Please remove that. Since ours will be lower thats what they will agree on when establishing connection.

    It will automatically negotiate, in fact, it is useless to delete it.

Sign In or Register to comment.