Community discussions

MikroTik App
 
tirkitneth
newbie
Topic Author
Posts: 31
Joined: Wed Nov 06, 2013 9:17 pm

BGP KeepaliveTimer expired

Sat Oct 10, 2015 1:18 am

Hello,

I have configured a simple virtual LAB (using CHR 6.32 and VirtualBox). I keep getting these messages about expired BGP keepalive timers.

I believe this should not happen. Is there something wrong in my setup ?

Topology:
R1 and R2 are connected with 2 VLANS on ether2 (2x /30). R1 and R3 are connected through "internet". There is a L2TP/IPSEC session between R1 and R3.
R1 and R2 both have a loopback interface. Loopback address is exchanged with OSPF.
There is a iBGP session between both R1 and R2 loopbacks. There is a eBGP session between L2TP interfaces.

OSPF looks OK: no packet loss between R1 and R2 loopbacks.
L2TP/IPSEC looks OK: no packet loss between R1 and R3 L2TP interfaces.
BGP routes look OK too: routes are in the routing and don't disappear (because holdtimer is not expired).

R1 config:
/routing bgp instance
set default client-to-client-reflection=no router-id=10.80.0.1
/routing ospf instance
set [ find default=yes ] router-id=10.80.0.1
/routing bgp network
add network=172.16.0.0/24
/routing bgp peer
add keepalive-time=1m name=R3 remote-address=10.80.0.2 remote-as=65530 update-source=br-lo0
add keepalive-time=1m name=R3 passive=yes remote-address=10.80.64.2 remote-as=4200010001 update-source=l2tp-R3
/routing ospf interface
add interface=ether2.10 network-type=broadcast use-bfd=yes
add interface=ether2.20 network-type=broadcast use-bfd=yes
/routing ospf network
add area=backbone network=10.80.0.1/32
add area=backbone network=10.80.0.128/30
add area=backbone network=10.80.0.132/30
R2:
/routing bgp instance
set default client-to-client-reflection=no router-id=10.80.0.2
/routing ospf instance
set [ find default=yes ] router-id=10.80.0.2
/routing bgp network
add network=172.16.0.0/24
/routing bgp peer
add keepalive-time=1m name=R1 remote-address=10.80.0.1 remote-as=65530 update-source=br-lo0
/routing ospf interface
add interface=ether2.10 network-type=broadcast use-bfd=yes
add interface=ether2.20 network-type=broadcast use-bfd=yes
/routing ospf network
add area=backbone network=10.80.0.2/32
add area=backbone network=10.80.0.128/30
add area=backbone network=10.80.0.132/30
R3:
/routing bgp instance
set default as=4200010001 client-to-client-reflection=no router-id=10.81.0.1
/routing bgp network
add network=10.81.0.0/24
/routing bgp peer
add keepalive-time=1m name=R1 remote-address=10.80.64.1 remote-as=65530 update-source=l2tp-R1
Log:
22:09:00 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:09:05 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:09:05 route,ospf,debug   received options: E
22:09:05 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:09:05 route,ospf,debug   received options: E
22:09:06 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:09:10 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:09:15 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:09:15 route,ospf,debug   received options: E
22:09:15 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:09:15 route,ospf,debug   received options: E
22:09:16 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:09:20 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10

22:09:21 route,bgp,debug,timer KeepaliveTimer expired
22:09:21 route,bgp,debug,timer     RemoteAddress=10.80.64.2

22:09:25 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:09:25 route,ospf,debug   received options: E
22:09:25 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:09:25 route,ospf,debug   received options: E
22:09:26 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:09:30 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:09:35 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:09:35 route,ospf,debug   received options: E
22:09:35 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:09:35 route,ospf,debug   received options: E
22:09:36 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20

22:09:40 route,bgp,debug,timer KeepaliveTimer expired
22:09:40 route,bgp,debug,timer     RemoteAddress=10.80.0.2

22:09:40 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:09:45 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:09:45 route,ospf,debug   received options: E
22:09:45 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:09:45 route,ospf,debug   received options: E
22:09:46 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:09:50 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:09:55 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:09:55 route,ospf,debug   received options: E
22:09:55 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:09:55 route,ospf,debug   received options: E
22:09:56 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:10:00 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:10:05 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:10:05 route,ospf,debug   received options: E
22:10:05 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:10:05 route,ospf,debug   received options: E
22:10:06 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:10:10 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10

22:10:10 route,bgp,debug,timer KeepaliveTimer expired
22:10:10 route,bgp,debug,timer     RemoteAddress=10.80.64.2

22:10:15 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:10:15 route,ospf,debug   received options: E
22:10:15 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:10:15 route,ospf,debug   received options: E
22:10:16 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:10:20 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:10:25 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:10:25 route,ospf,debug   received options: E
22:10:25 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:10:25 route,ospf,debug   received options: E
22:10:26 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20

22:10:27 route,bgp,debug,timer KeepaliveTimer expired
22:10:27 route,bgp,debug,timer     RemoteAddress=10.80.0.2

22:10:30 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:10:35 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:10:35 route,ospf,debug   received options: E
22:10:35 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:10:35 route,ospf,debug   received options: E
22:10:36 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:10:40 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:10:45 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:10:45 route,ospf,debug   received options: E
22:10:45 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:10:45 route,ospf,debug   received options: E
22:10:46 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20
22:10:50 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10
22:10:55 route,ospf,debug RECV: Hello <- 10.80.0.130 on ether2.10 (10.80.0.129)
22:10:55 route,ospf,debug   received options: E
22:10:55 route,ospf,debug RECV: Hello <- 10.80.0.134 on ether2.20 (10.80.0.133)
22:10:55 route,ospf,debug   received options: E
22:10:56 route,ospf,debug SEND: Hello 10.80.0.133 -> 224.0.0.5 on ether2.20

22:10:58 route,bgp,debug,timer KeepaliveTimer expired
22:10:58 route,bgp,debug,timer     RemoteAddress=10.80.64.2

22:11:00 route,ospf,debug SEND: Hello 10.80.0.129 -> 224.0.0.5 on ether2.10

I don't think this is a normal behavior (it does not happen on other brands).

Could it be related to CHR and/or virtualization ?
 
User avatar
bajodel
Long time Member
Long time Member
Posts: 552
Joined: Sun Nov 24, 2013 8:30 am
Location: Italy

Re: BGP KeepaliveTimer expired

Sun Oct 11, 2015 9:52 am

IMHO I would try with { keepalive-time=30s } instead of 1m
Consider defaul hold-time is 3 min and used-keepalive-time negotiated and used on peers = (used-hold-time / 3); in logs it's clear that timeout occurred on about 50sec (little bit faster than the expected 1m).

You don't loose routes because of the updates ..copy/paste..
According to the BGP specification, if router does not receive successive KEEPALIVE and/or UPDATE and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the BGP connection to the peer will be closed.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7188
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP KeepaliveTimer expired

Mon Oct 12, 2015 11:24 am

This is normal message. IT shows that keepalive time expired and is reset. Problem would be if keepalive expires and router did not receive any keepalive messages during keepalive period.
 
tirkitneth
newbie
Topic Author
Posts: 31
Joined: Wed Nov 06, 2013 9:17 pm

Re: BGP KeepaliveTimer expired

Wed Oct 21, 2015 11:32 pm

OK thank you for the answer.

Who is online

Users browsing this forum: No registered users and 3 guests